lkml.org 
[lkml]   [2012]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectCrash in mtd_cls_suspend because mtd is NULL.

Hi,
I just tried to suspend my GTA04 (OMAP based mobile phone platform) running
3.3-rc2 and it crashed in mtd_cls_suspend because mtd was NULL.

So for me, it looks like the following patch is a regression.

Is there anything I can do to help find the correct resolution here.

(It has some flash memory but I am not using it at all).

Thanks,
NeilBrown




commit 079c985e7a6f4ce60f931cebfdd5ee3c38347e31
Author: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Date: Fri Dec 30 17:15:59 2011 +0200

mtd: do not use mtd->suspend and mtd->resume directly

Just call the 'mtd_suspend()' and 'mtd_resume()' - they will do nothing
if the operation is not defined.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index 66494ee..6ae9ca0 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -119,10 +119,7 @@ static int mtd_cls_suspend(struct device *dev, pm_message_t
{
struct mtd_info *mtd = dev_get_drvdata(dev);

- if (mtd && mtd->suspend)
- return mtd_suspend(mtd);
- else
- return 0;
+ return mtd_suspend(mtd);
}

static int mtd_cls_resume(struct device *dev)
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2012-02-03 00:53    [W:0.042 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site