Skip to content

Commit f0e96e2

Browse files
Uwe Kleine-Königthierryreding
authored andcommitted
pwm: pca9685: 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 pca9685_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 faaa222 commit f0e96e2

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/pwm/pwm-pca9685.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -601,11 +601,8 @@ static int pca9685_pwm_probe(struct i2c_client *client,
601601
static int pca9685_pwm_remove(struct i2c_client *client)
602602
{
603603
struct pca9685 *pca = i2c_get_clientdata(client);
604-
int ret;
605604

606-
ret = pwmchip_remove(&pca->chip);
607-
if (ret)
608-
return ret;
605+
pwmchip_remove(&pca->chip);
609606

610607
if (!pm_runtime_enabled(&client->dev)) {
611608
/* Put chip in sleep state if runtime PM is disabled */

0 commit comments

Comments
 (0)