summaryrefslogtreecommitdiff
path: root/drivers/media/i2c/rdacm20.c
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo+renesas@jmondi.org>2021-06-16 14:46:15 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-06-17 11:55:19 +0200
commit47f8b8a2cfee45f2405527e225a566fe39f9d400 (patch)
treedb27b5abcac329c9c1050ca9bb3337f7f5b297f4 /drivers/media/i2c/rdacm20.c
parent59a81c70b0b3563fe8426b0fe4d96263b6fa8823 (diff)
media: i2c: rdacm20: Check return values
The camera module initialization routine does not check the return value of a few functions. Fix that. Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/i2c/rdacm20.c')
-rw-r--r--drivers/media/i2c/rdacm20.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/media/i2c/rdacm20.c b/drivers/media/i2c/rdacm20.c
index 343604b61e2a..0fc5512cd5e7 100644
--- a/drivers/media/i2c/rdacm20.c
+++ b/drivers/media/i2c/rdacm20.c
@@ -466,11 +466,16 @@ static int rdacm20_initialize(struct rdacm20_device *dev)
* Ensure that we have a good link configuration before attempting to
* identify the device.
*/
- max9271_configure_i2c(&dev->serializer, MAX9271_I2CSLVSH_469NS_234NS |
- MAX9271_I2CSLVTO_1024US |
- MAX9271_I2CMSTBT_105KBPS);
+ ret = max9271_configure_i2c(&dev->serializer,
+ MAX9271_I2CSLVSH_469NS_234NS |
+ MAX9271_I2CSLVTO_1024US |
+ MAX9271_I2CMSTBT_105KBPS);
+ if (ret)
+ return ret;
- max9271_configure_gmsl_link(&dev->serializer);
+ ret = max9271_configure_gmsl_link(&dev->serializer);
+ if (ret)
+ return ret;
ret = max9271_verify_id(&dev->serializer);
if (ret < 0)