summaryrefslogtreecommitdiff
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-04-27 09:36:00 +0300
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-05-10 12:36:33 +0300
commit6005a8e955e4e451e4bf6000affaab566d4cab5e (patch)
tree77f7b8c94a8799c3a9e355348414f2745a18034b /drivers/media/i2c
parent747bad54a677d8633ec14b39dfbeb859c821d7f2 (diff)
downloadlinux-6005a8e955e4e451e4bf6000affaab566d4cab5e.tar.xz
media: i2c: ccs-core: return the right error code at suspend
If pm_runtime resume logic fails, return the error code provided by it, instead of -EAGAIN, as, depending on what caused it to fail, it may not be something that would be recovered. Fixes: cbba45d43631 ("[media] smiapp: Use runtime PM") Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/ccs/ccs-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c
index 9dc3f45da3dc..b05f409014b2 100644
--- a/drivers/media/i2c/ccs/ccs-core.c
+++ b/drivers/media/i2c/ccs/ccs-core.c
@@ -3093,7 +3093,7 @@ static int __maybe_unused ccs_suspend(struct device *dev)
if (rval < 0) {
pm_runtime_put_noidle(dev);
- return -EAGAIN;
+ return rval;
}
if (sensor->streaming)