diff options
author | Brian Norris <computersforpeace@gmail.com> | 2013-10-27 18:42:12 -0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2013-11-07 02:33:14 -0500 |
commit | 9650b9bec61d861b6b59d09eb389410b05d196e4 (patch) | |
tree | d53bcfc84c3b538cbf16f0500a2e57d90cb1a130 /drivers/mtd/devices/m25p80.c | |
parent | d367e37e004ca6847d5503781d218a266e8bc1ef (diff) |
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>
Diffstat (limited to 'drivers/mtd/devices/m25p80.c')
-rw-r--r-- | drivers/mtd/devices/m25p80.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index 58978892c321..7eda71dbc183 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) | |||
1125 | struct m25p *flash = spi_get_drvdata(spi); | 1125 | struct m25p *flash = spi_get_drvdata(spi); |
1126 | 1126 | ||
1127 | /* Clean up MTD stuff. */ | 1127 | /* Clean up MTD stuff. */ |
1128 | mtd_device_unregister(&flash->mtd); | 1128 | return mtd_device_unregister(&flash->mtd); |
1129 | |||
1130 | return 0; | ||
1131 | } | 1129 | } |
1132 | 1130 | ||
1133 | 1131 | ||