Skip to content

Commit f4a20df

Browse files
Uwe Kleine-Königbrgl
authored andcommitted
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 <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 06de2cd commit f4a20df

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/gpio/gpio-mc33880.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,6 @@ static int mc33880_remove(struct spi_device *spi)
139139
struct mc33880 *mc;
140140

141141
mc = spi_get_drvdata(spi);
142-
if (!mc)
143-
return -ENODEV;
144142

145143
gpiochip_remove(&mc->chip);
146144
mutex_destroy(&mc->lock);

0 commit comments

Comments
 (0)