summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2014-03-20 11:11:47 +0000
committerBrian Norris <computersforpeace@gmail.com>2014-03-20 04:56:53 -0700
commitd9ba46d32c0edc5207fec424230dfa786a24a117 (patch)
tree3d49a25e7ee8c4bbafd46738bc35d4ce0df7742e /drivers/mtd/devices
parentea7864bf44e1638c34b9eef95477a72ae68fbdc6 (diff)
downloadop-kernel-dev-d9ba46d32c0edc5207fec424230dfa786a24a117.zip
op-kernel-dev-d9ba46d32c0edc5207fec424230dfa786a24a117.tar.gz
mtd: st_spi_fsm: Succinctly reorganise .remove()
Reported-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/devices')
-rw-r--r--drivers/mtd/devices/st_spi_fsm.c7
1 files changed, 1 insertions, 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[] = {
OpenPOWER on IntegriCloud