mtd: st_spi_fsm: Succinctly reorganise .remove()
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Sat Apr 5 02:59:06 EDT 2014
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=d9ba46d32c0edc5207fec424230dfa786a24a117
Commit: d9ba46d32c0edc5207fec424230dfa786a24a117
Parent: ea7864bf44e1638c34b9eef95477a72ae68fbdc6
Author: Lee Jones <lee.jones at linaro.org>
AuthorDate: Thu Mar 20 11:11:47 2014 +0000
Committer: Brian Norris <computersforpeace at gmail.com>
CommitDate: Thu Mar 20 04:56:53 2014 -0700
mtd: st_spi_fsm: Succinctly reorganise .remove()
Reported-by: Brian Norris <computersforpeace at gmail.com>
Signed-off-by: Lee Jones <lee.jones at linaro.org>
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
drivers/mtd/devices/st_spi_fsm.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/mtd/devices/st_spi_fsm.c b/drivers/mtd/devices/st_spi_fsm.c
index 4d6b58c..1957d7c 100644
--- a/drivers/mtd/devices/st_spi_fsm.c
+++ b/drivers/mtd/devices/st_spi_fsm.c
@@ -2082,13 +2082,8 @@ static int stfsm_probe(struct platform_device *pdev)
static int stfsm_remove(struct platform_device *pdev)
{
struct stfsm *fsm = platform_get_drvdata(pdev);
- int err;
- err = mtd_device_unregister(&fsm->mtd);
- if (err)
- return err;
-
- return 0;
+ return mtd_device_unregister(&fsm->mtd);
}
static struct of_device_id stfsm_match[] = {
More information about the linux-mtd-cvs
mailing list