diff options
Diffstat (limited to 'drivers/mtd/mtdcore.c')
-rw-r--r-- | drivers/mtd/mtdcore.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index 6ae9ca01388b..9a9ce71a71fc 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c | |||
@@ -119,7 +119,7 @@ static int mtd_cls_suspend(struct device *dev, pm_message_t state) | |||
119 | { | 119 | { |
120 | struct mtd_info *mtd = dev_get_drvdata(dev); | 120 | struct mtd_info *mtd = dev_get_drvdata(dev); |
121 | 121 | ||
122 | return mtd_suspend(mtd); | 122 | return mtd ? mtd_suspend(mtd) : 0; |
123 | } | 123 | } |
124 | 124 | ||
125 | static int mtd_cls_resume(struct device *dev) | 125 | static int mtd_cls_resume(struct device *dev) |