mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-26 04:16:39 +00:00
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>
This commit is contained in:
parent
1923433cd6
commit
3d57fa2a22
1 changed files with 1 additions and 5 deletions
|
@ -281,11 +281,7 @@ static int iproc_gpio_probe(struct platform_device *pdev)
|
|||
|
||||
static int iproc_gpio_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct iproc_gpio_chip *chip;
|
||||
|
||||
chip = platform_get_drvdata(pdev);
|
||||
if (!chip)
|
||||
return -ENODEV;
|
||||
struct iproc_gpio_chip *chip = platform_get_drvdata(pdev);
|
||||
|
||||
if (chip->intr) {
|
||||
u32 val;
|
||||
|
|
Loading…
Reference in a new issue