Skip to content

Commit 7587f8a

Browse files
Uwe Kleine-Königthierryreding
authored andcommitted
pwm: sun4i: Don't check the return code of pwmchip_remove()
pwmchip_remove() returns always 0. Don't use the value to make it possible to eventually change the function to return void. Also the driver core ignores the return value of sun4i_pwm_remove() and considers the device removed anyhow. So returning early results in a resource leak. Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent ceb2c28 commit 7587f8a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/pwm/pwm-sun4i.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -484,11 +484,8 @@ static int sun4i_pwm_probe(struct platform_device *pdev)
484484
static int sun4i_pwm_remove(struct platform_device *pdev)
485485
{
486486
struct sun4i_pwm_chip *pwm = platform_get_drvdata(pdev);
487-
int ret;
488487

489-
ret = pwmchip_remove(&pwm->chip);
490-
if (ret)
491-
return ret;
488+
pwmchip_remove(&pwm->chip);
492489

493490
clk_disable_unprepare(pwm->bus_clk);
494491
reset_control_assert(pwm->rst);

0 commit comments

Comments
 (0)