Patchwork mtd: mtdcore: remove unnecessary mtd->resume check

login
register
mail settings
Submitter Brian Norris
Date Jan. 27, 2012, 8:39 p.m.
Message ID <1327696772-18081-1-git-send-email-computersforpeace@gmail.com>
Download mbox | patch
Permalink /patch/138287/
State New
Headers show

Comments

Brian Norris - Jan. 27, 2012, 8:39 p.m.
We don't need to to check for mtd->resume before calling mtd_resume().
mtd_resume() should take care of that.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
 drivers/mtd/mtdcore.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Artem Bityutskiy - Feb. 2, 2012, 11:39 a.m.
On Fri, 2012-01-27 at 12:39 -0800, Brian Norris wrote:
> We don't need to to check for mtd->resume before calling mtd_resume().
> mtd_resume() should take care of that.
> 
> Signed-off-by: Brian Norris <computersforpeace@gmail.com>

Pushed to l2-mtd.git, thanks!

Patch

diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index de96865..f96c2cd 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -126,7 +126,7 @@  static int mtd_cls_resume(struct device *dev)
 {
 	struct mtd_info *mtd = dev_get_drvdata(dev);
 
-	if (mtd && mtd->resume)
+	if (mtd)
 		mtd_resume(mtd);
 	return 0;
 }