mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-13 14:24:11 +08:00
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: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
This commit is contained in:
parent
06de2cd788
commit
f4a20dfac8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user