All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: m25p80: fixup device removal failure path
@ 2013-10-30 23:42 Brian Norris
  2013-10-31  7:36 ` Marek Vasut
  0 siblings, 1 reply; 3+ messages in thread
From: Brian Norris @ 2013-10-30 23:42 UTC (permalink / raw)
  To: linux-mtd; +Cc: Marek Vasut, Brian Norris

Device removal shouls fail if MTD unregistration fails.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
 drivers/mtd/devices/m25p80.c | 4 +---
 1 file changed, 1 insertion(+), 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)
 	struct m25p	*flash = spi_get_drvdata(spi);
 
 	/* Clean up MTD stuff. */
-	mtd_device_unregister(&flash->mtd);
-
-	return 0;
+	return mtd_device_unregister(&flash->mtd);
 }
 
 
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-10-31 14:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-30 23:42 [PATCH] mtd: m25p80: fixup device removal failure path Brian Norris
2013-10-31  7:36 ` Marek Vasut
2013-10-31 14:27   ` Brian Norris

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.