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: cbba45d436 ("[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>
This commit is contained in:
Mauro Carvalho Chehab 2021-04-27 08:36:00 +02:00
parent 747bad54a6
commit 6005a8e955

View file

@ -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)