From d9ba46d32c0edc5207fec424230dfa786a24a117 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Thu, 20 Mar 2014 11:11:47 +0000 Subject: [PATCH] mtd: st_spi_fsm: Succinctly reorganise .remove() Reported-by: Brian Norris Signed-off-by: Lee Jones Signed-off-by: Brian Norris --- 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 4d6b58c976c7..1957d7c8e185 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[] = { -- 2.20.1