Skip to content

Commit 4e33497

Browse files
Uwe Kleine-Königthierryreding
authored andcommitted
pwm: samsung: 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 pwm_samsung_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 81d4b5c commit 4e33497

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/pwm/pwm-samsung.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -580,11 +580,8 @@ static int pwm_samsung_probe(struct platform_device *pdev)
580580
static int pwm_samsung_remove(struct platform_device *pdev)
581581
{
582582
struct samsung_pwm_chip *chip = platform_get_drvdata(pdev);
583-
int ret;
584583

585-
ret = pwmchip_remove(&chip->chip);
586-
if (ret < 0)
587-
return ret;
584+
pwmchip_remove(&chip->chip);
588585

589586
clk_disable_unprepare(chip->base_clk);
590587

0 commit comments

Comments
 (0)