Skip to content
Snippets Groups Projects
Commit f4a20dfa authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Bartosz Golaszewski
Browse files

gpio: mc33880: Drop if with an always false condition


An spi remove callback is only called for devices that probed
successfully. In this case this implies that mc33880_probe() set a
non-NULL driver data. So the check for mc being NULL is never true and
the check can be dropped.

Also the return value ofspi remove callbacks is ignored anyway.

Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarBartosz Golaszewski <brgl@bgdev.pl>
parent 06de2cd7
No related branches found
No related tags found
No related merge requests found
......@@ -139,8 +139,6 @@ static int mc33880_remove(struct spi_device *spi)
struct mc33880 *mc;
mc = spi_get_drvdata(spi);
if (!mc)
return -ENODEV;
gpiochip_remove(&mc->chip);
mutex_destroy(&mc->lock);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment