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: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
This commit is contained in:
Uwe Kleine-König 2021-05-05 18:19:08 +02:00 committed by Thierry Reding
parent 0512f0503b
commit 81b7c173e3

View File

@ -210,8 +210,6 @@ static int pwm_remove(struct platform_device *pdev)
struct pxa_pwm_chip *chip;
chip = platform_get_drvdata(pdev);
if (chip == NULL)
return -ENODEV;
return pwmchip_remove(&chip->chip);
}