]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Apr 2025 08:45:24 +0000 (10:45 +0200)
commit 80704d14f1bd3628f578510e0a88b66824990ef6 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/i2c/ccs/ccs-core.c

index 82f727dd8c7589b3a10c2d0cd4c608061ef73e53..36402612425779625d588229fcd86e5f20f8a44f 100644 (file)
@@ -3651,6 +3651,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_media_entity_cleanup:
        media_entity_cleanup(&sensor->src->sd.entity);