]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: xgs-iproc: Drop if with an always false condition
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 15 Jun 2022 12:47:18 +0000 (14:47 +0200)
committerBartosz Golaszewski <brgl@bgdev.pl>
Tue, 19 Jul 2022 07:57:13 +0000 (09:57 +0200)
commitfe95fb625dabc280211ddd06658d4213ac56451d
treeb33b0e65ecd21ecde28b68fc8938b963e6da5f42
parent9b010f8441a6ed8720cbe2f2a1546cba3c80fbf6
gpio: xgs-iproc: 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 chip is never NULL.

Also note that returning an error code from a remove callback doesn't
result in the device staying bound. It's still removed and devm
callbacks are called.

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: Bartosz Golaszewski <brgl@bgdev.pl>
drivers/gpio/gpio-xgs-iproc.c