Skip to content

Commit

Permalink
media: i2c: ccs-core: return the right error code at suspend
Browse files Browse the repository at this point in the history
[ Upstream commit 6005a8e ]

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: cbba45d ("[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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
mchehab authored and gregkh committed Jul 14, 2021
1 parent 1357e14 commit 5229115
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/i2c/ccs/ccs-core.c
Expand Up @@ -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)
Expand Down

0 comments on commit 5229115

Please sign in to comment.