Skip to content

Commit 6e42de4

Browse files
Uwe Kleine-Königclaudiubeznea
authored andcommitted
pwm: atmel-tcb: 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 atmel_tcb_pwm_remove() and considers the device removed anyhow. So returning early results in a resource leak. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
1 parent 504da5f commit 6e42de4

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

drivers/pwm/pwm-atmel-tcb.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -503,11 +503,8 @@ static int atmel_tcb_pwm_probe(struct platform_device *pdev)
503503
static int atmel_tcb_pwm_remove(struct platform_device *pdev)
504504
{
505505
struct atmel_tcb_pwm_chip *tcbpwm = platform_get_drvdata(pdev);
506-
int err;
507506

508-
err = pwmchip_remove(&tcbpwm->chip);
509-
if (err < 0)
510-
return err;
507+
pwmchip_remove(&tcbpwm->chip);
511508

512509
clk_disable_unprepare(tcbpwm->slow_clk);
513510
clk_put(tcbpwm->slow_clk);

0 commit comments

Comments
 (0)