projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0512f05
)
pwm: pxa: Drop if with an always false condition
author
Uwe Kleine-König
<u.kleine-koenig@pengutronix.de>
Wed, 5 May 2021 16:19:08 +0000
(18:19 +0200)
committer
Thierry Reding
<thierry.reding@gmail.com>
Wed, 30 Jun 2021 17:12:18 +0000
(19:12 +0200)
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>
drivers/pwm/pwm-pxa.c
patch
|
blob
|
history
diff --git
a/drivers/pwm/pwm-pxa.c
b/drivers/pwm/pwm-pxa.c
index cfb683827d32ed8c37f2eee4b91fac328ed07233..31752640dcf73346b49d54b39544c16a2837ee27 100644
(file)
--- 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);
}