diff options
| author | Uwe Kleine-König <[email protected]> | 2021-05-05 16:19:08 +0000 |
|---|---|---|
| committer | Thierry Reding <[email protected]> | 2021-06-30 17:12:18 +0000 |
| commit | 81b7c173e3609ed77a9f9909406aefa122801a38 (patch) | |
| tree | 3ba83ab9baf0d3441c4f846b342a9821804c4399 /drivers/pwm/pwm-pxa.c | |
| parent | pwm: berlin: Don't check the return code of pwmchip_remove() (diff) | |
| download | kernel-81b7c173e3609ed77a9f9909406aefa122801a38.tar.gz kernel-81b7c173e3609ed77a9f9909406aefa122801a38.zip | |
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 <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
Diffstat (limited to 'drivers/pwm/pwm-pxa.c')
| -rw-r--r-- | drivers/pwm/pwm-pxa.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/pwm/pwm-pxa.c b/drivers/pwm/pwm-pxa.c index cfb683827d32..31752640dcf7 100644 --- a/drivers/pwm/pwm-pxa.c +++ b/drivers/pwm/pwm-pxa.c @@ -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); } |
