Thread (711 messages) 711 messages, 9 authors, 2021-07-13

[PATCH 5.12 252/700] media: i2c: ccs-core: return the right error code at suspend

flat view
STALE1924d REVIEWED: 2 (1M)

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2021-07-12 07:40:12
Also in: lkml
Subsystem: media input infrastructure (v4l/dvb), mipi ccs, smia and smia++ image sensor driver, the rest · Maintainers: Mauro Carvalho Chehab, Sakari Ailus, Linus Torvalds

2 review trailers (1 from subsystem maintainers).

From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

[ Upstream commit 6005a8e955e4e451e4bf6000affaab566d4cab5e ]

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 <redacted>
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>
---
 drivers/media/i2c/ccs/ccs-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c
index 4505594996bd..fde0c51f0406 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)
-- 
2.30.2


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help