From: Lee Jones Date: Thu, 20 Mar 2014 11:11:47 +0000 (+0000) Subject: mtd: st_spi_fsm: Succinctly reorganise .remove() X-Git-Tag: Ubuntu-5.2.0-15.16~13693^2~10 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=d9ba46d32c0edc5207fec424230dfa786a24a117;p=mirror_ubuntu-eoan-kernel.git mtd: st_spi_fsm: Succinctly reorganise .remove() Reported-by: Brian Norris Signed-off-by: Lee Jones Signed-off-by: Brian Norris --- 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[] = {