diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2022-06-03 23:07:51 +0200 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2022-06-09 15:06:19 +0200 |
commit | 279d719be39d8edb37c9178c15e167a94c7bc0a0 (patch) | |
tree | d9c084f18ac79bab97237902bde9743e03ae0251 /drivers/mtd | |
parent | mtd: spear_smi: Don't skip cleanup after mtd_device_unregister() failed (diff) | |
download | linux-279d719be39d8edb37c9178c15e167a94c7bc0a0.tar.xz linux-279d719be39d8edb37c9178c15e167a94c7bc0a0.zip |
mtd: spear_smi: Drop if with an always false condition
The remove callback is only called after probe completed successfully.
In this case platform_set_drvdata() was called with a non-NULL argument
and so dev is never NULL.
This is a preparation for making platform remove callbacks return void.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20220603210758.148493-8-u.kleine-koenig@pengutronix.de
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/devices/spear_smi.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/mtd/devices/spear_smi.c b/drivers/mtd/devices/spear_smi.c index f6febe6662db..f58742486d3d 100644 --- a/drivers/mtd/devices/spear_smi.c +++ b/drivers/mtd/devices/spear_smi.c @@ -1048,10 +1048,6 @@ static int spear_smi_remove(struct platform_device *pdev) int i; dev = platform_get_drvdata(pdev); - if (!dev) { - dev_err(&pdev->dev, "dev is null\n"); - return -ENODEV; - } /* clean up for all nor flash */ for (i = 0; i < dev->num_flashes; i++) { |