Commit 81b7c173 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Thierry Reding

pwm: pxa: Drop if with an always false condition

The .remove() function is only called after .probe() returned
successfully. In this case platform_set_drvdata() was called with a
non-NULL argument and so platfrom_get_drvdata() returns the same
non-NULL value.
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent 0512f050
...@@ -210,8 +210,6 @@ static int pwm_remove(struct platform_device *pdev) ...@@ -210,8 +210,6 @@ static int pwm_remove(struct platform_device *pdev)
struct pxa_pwm_chip *chip; struct pxa_pwm_chip *chip;
chip = platform_get_drvdata(pdev); chip = platform_get_drvdata(pdev);
if (chip == NULL)
return -ENODEV;
return pwmchip_remove(&chip->chip); return pwmchip_remove(&chip->chip);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment