diff options
| author | Cong Nguyen <congnt264@gmail.com> | 2026-07-27 22:51:15 +0700 |
|---|---|---|
| committer | Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> | 2026-08-07 23:51:05 +0100 |
| commit | a40b2e7a17f26e38ab054363c9c7cde149588357 (patch) | |
| tree | d932d486f9f9c88bbaf80236965f7b776a79f02c /tools/perf/scripts/python | |
| parent | d39afd249d1ef5cb03b6f1dc22a68e6385de413d (diff) | |
| download | linux-a40b2e7a17f26e38ab054363c9c7cde149588357.tar.gz linux-a40b2e7a17f26e38ab054363c9c7cde149588357.zip | |
iio: srf04: fix pm_runtime handling on probe error path
When pm_runtime_set_active() fails during probe, the driver logs the
error and unregisters the IIO device, but then falls through and still
calls pm_runtime_enable() before returning the error.
Since probe returns an error, srf04_remove() is never called, so
runtime PM is left enabled without a matching pm_runtime_disable().
This leaks the enable and triggers an "Unbalanced pm_runtime_enable!"
warning on a subsequent bind of the device.
Return the error right after unregistering the IIO device so that
runtime PM is not enabled on the failure path.
Fixes: 2251157b335b ("iio: srf04: add power management feature")
Cc: stable@vger.kernel.org
Signed-off-by: Cong Nguyen <congnt264@gmail.com>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
