diff options
| author | Jinjie Ruan <ruanjinjie@huawei.com> | 2024-09-23 11:55:56 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-12-05 10:59:38 +0100 |
| commit | 7384c6f22266e0170b0d45e578fc54805fda8b6c (patch) | |
| tree | 0570f748cbdd3b1d5a4f424fd5f2e229bfbdb763 | |
| parent | cb71b14410755d6fa3f743c9aaccccf3011a07f8 (diff) | |
misc: apds990x: Fix missing pm_runtime_disable()
[ Upstream commit 3c5d8b819d27012264edd17e6ae7fffda382fe44 ]
The pm_runtime_disable() is missing in probe error path,
so add it to fix it.
Fixes: 92b1f84d46b2 ("drivers/misc: driver for APDS990X ALS and proximity sensors")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Link: https://lore.kernel.org/r/20240923035556.3009105-1-ruanjinjie@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
| -rw-r--r-- | drivers/misc/apds990x.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/misc/apds990x.c b/drivers/misc/apds990x.c index ed9412d750b7..871d2d42db93 100644 --- a/drivers/misc/apds990x.c +++ b/drivers/misc/apds990x.c @@ -1163,7 +1163,7 @@ static int apds990x_probe(struct i2c_client *client, err = chip->pdata->setup_resources(); if (err) { err = -EINVAL; - goto fail3; + goto fail4; } } @@ -1171,7 +1171,7 @@ static int apds990x_probe(struct i2c_client *client, apds990x_attribute_group); if (err < 0) { dev_err(&chip->client->dev, "Sysfs registration failed\n"); - goto fail4; + goto fail5; } err = request_threaded_irq(client->irq, NULL, @@ -1182,15 +1182,17 @@ static int apds990x_probe(struct i2c_client *client, if (err) { dev_err(&client->dev, "could not get IRQ %d\n", client->irq); - goto fail5; + goto fail6; } return err; -fail5: +fail6: sysfs_remove_group(&chip->client->dev.kobj, &apds990x_attribute_group[0]); -fail4: +fail5: if (chip->pdata && chip->pdata->release_resources) chip->pdata->release_resources(); +fail4: + pm_runtime_disable(&client->dev); fail3: regulator_bulk_disable(ARRAY_SIZE(chip->regs), chip->regs); fail2: |
