Skip to content

Commit 279d719

Browse files
Uwe Kleine-Königmiquelraynal
authored andcommitted
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
1 parent 0057568 commit 279d719

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

drivers/mtd/devices/spear_smi.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,10 +1048,6 @@ static int spear_smi_remove(struct platform_device *pdev)
10481048
int i;
10491049

10501050
dev = platform_get_drvdata(pdev);
1051-
if (!dev) {
1052-
dev_err(&pdev->dev, "dev is null\n");
1053-
return -ENODEV;
1054-
}
10551051

10561052
/* clean up for all nor flash */
10571053
for (i = 0; i < dev->num_flashes; i++) {

0 commit comments

Comments
 (0)