media: i2c: ccs: Set the device's runtime PM status correctly in probe
authorSakari Ailus <sakari.ailus@linux.intel.com>
Fri, 10 Jan 2025 13:54:22 +0000 (15:54 +0200)
committerHans Verkuil <hverkuil@xs4all.nl>
Sat, 15 Feb 2025 14:22:50 +0000 (15:22 +0100)
Set the device's runtime PM status to suspended in probe error paths where
it was previously set to active.

Fixes: 9447082ae666 ("[media] smiapp: Implement power-on and power-off sequences without runtime PM")
Cc: stable@vger.kernel.org # for >= v5.15
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/i2c/ccs/ccs-core.c

index 45b317216abac270baaedde4de272a3b678950c4..004d28c3328757729de8ee30d84340a016e31295 100644 (file)
@@ -3566,6 +3566,7 @@ static int ccs_probe(struct i2c_client *client)
 out_disable_runtime_pm:
        pm_runtime_put_noidle(&client->dev);
        pm_runtime_disable(&client->dev);
+       pm_runtime_set_suspended(&client->dev);
 
 out_cleanup:
        ccs_cleanup(sensor);