mtd: m25p80: fixup device removal failure path
PATCH 1/1 mtd: m25p80: fixup device removal failure path
Device removal shouls fail if MTD unregistration fails.
Signed-off-by Brian Norris <[email protected]>
--- drivers/mtd/devices/m25p80.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/mtd/devices/m25p80.c +1 -3
@@ -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); }
Signature · 1 line
1.8.1.2
Dear Brian Norris,
Quoted 1 line
Device removal shouls fail if MTD unregistration fails.
should ;-)
Reviewed-by Marek Vasut <[email protected]>
Quoted 11 lines
Signed-off-by Brian Norris <[email protected]>--- drivers/mtd/devices/m25p80.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/mtd/devices/m25p80.c +0
-0
drivers/mtd/devices/m25p80.c static int m25p_remove(struct spi_device *spi) · line 1129
Quoted 8 lines
drivers/mtd/devices/m25p80.c +1
-3@@ -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); }
Best regards,
Marek Vasut
Quoted 3 lines · Marek Vasut
Quoted 1 line
Device removal shouls fail if MTD unregistration fails.
should ;-)
Wow... I need to proofread myself a bit better. Thanks.
Quoted 1 line
Reviewed-by Marek Vasut <[email protected]>
Fixed and pushed to l2-mtd.git.
Brian