summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2013-10-27 22:42:12 (GMT)
committerMatthew Weigel <Matthew.Weigel@freescale.com>2014-12-11 18:37:15 (GMT)
commita821def088c0ca9511e9675e79bd113a695e2e70 (patch)
tree605679943d88914d9cc377d5cfb099573570826f /drivers/mtd
parentffaf4eadb5ce9c1a6a03d0793f50e2c4567c478a (diff)
downloadlinux-fsl-qoriq-a821def088c0ca9511e9675e79bd113a695e2e70.tar.xz
mtd: m25p80: fixup device removal failure path
Device removal should fail if MTD unregistration fails. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Reviewed-by: Marek Vasut <marex@denx.de> (cherry picked from commit 9650b9bec61d861b6b59d09eb389410b05d196e4) Change-Id: Ia597ef093f4d1492f9d04c4a7bbaa5be32e5d161 Reviewed-on: http://git.am.freescale.net:8181/20039 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/devices/m25p80.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 5897889..7eda71d 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -1125,9 +1125,7 @@ static int m25p_remove(struct spi_device *spi)
struct m25p *flash = spi_get_drvdata(spi);
/* Clean up MTD stuff. */
- mtd_device_unregister(&flash->mtd);
-
- return 0;
+ return mtd_device_unregister(&flash->mtd);
}