diff --git a/drivers/mtd/devices/st_spi_fsm.c b/drivers/mtd/devices/st_spi_fsm.c index 4d6b58c976c792f6a0b0deeac4b102a6174d17e6..1957d7c8e1853c4588057c1512e3d3ceb0c80e74 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[] = {