diff mbox series

[v2,17/17] media: i2c: imx290: Handle error from imx290_set_data_lanes()

Message ID 20230114171802.13878-17-laurent.pinchart@ideasonboard.com
State Accepted
Commit 05ef7ec49d6b7ed364ad68cf348f952ffcc22605
Headers show
Series [v2,01/17] media: i2c: imx290: Group functions in sections | expand

Commit Message

Laurent Pinchart Jan. 14, 2023, 5:18 p.m. UTC
Check the error status returned by imx290_set_data_lanes() in its
caller and propagate it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
Changes since v1:

- New patch
---
 drivers/media/i2c/imx290.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/media/i2c/imx290.c b/drivers/media/i2c/imx290.c
index a8167119534b..62d8d75aec3e 100644
--- a/drivers/media/i2c/imx290.c
+++ b/drivers/media/i2c/imx290.c
@@ -761,7 +761,11 @@  static int imx290_start_streaming(struct imx290 *imx290,
 	}
 
 	/* Set data lane count */
-	imx290_set_data_lanes(imx290);
+	ret = imx290_set_data_lanes(imx290);
+	if (ret < 0) {
+		dev_err(imx290->dev, "Could not set data lanes\n");
+		return ret;
+	}
 
 	/* Apply the register values related to current frame format */
 	format = v4l2_subdev_get_pad_format(&imx290->sd, state, 0);