Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>

authored by

Uwe Kleine-König and committed by
Thierry Reding
4e334973 81d4b5c4

+1 -4
+1 -4
drivers/pwm/pwm-samsung.c
··· 580 580 static int pwm_samsung_remove(struct platform_device *pdev) 581 581 { 582 582 struct samsung_pwm_chip *chip = platform_get_drvdata(pdev); 583 - int ret; 584 583 585 - ret = pwmchip_remove(&chip->chip); 586 - if (ret < 0) 587 - return ret; 584 + pwmchip_remove(&chip->chip); 588 585 589 586 clk_disable_unprepare(chip->base_clk); 590 587