Skip to content

Commit 47f8b8a

Browse files
Jacopo Mondimchehab
authored andcommitted
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>
1 parent 59a81c7 commit 47f8b8a

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

drivers/media/i2c/rdacm20.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -466,11 +466,16 @@ static int rdacm20_initialize(struct rdacm20_device *dev)
466466
* Ensure that we have a good link configuration before attempting to
467467
* identify the device.
468468
*/
469-
max9271_configure_i2c(&dev->serializer, MAX9271_I2CSLVSH_469NS_234NS |
470-
MAX9271_I2CSLVTO_1024US |
471-
MAX9271_I2CMSTBT_105KBPS);
469+
ret = max9271_configure_i2c(&dev->serializer,
470+
MAX9271_I2CSLVSH_469NS_234NS |
471+
MAX9271_I2CSLVTO_1024US |
472+
MAX9271_I2CMSTBT_105KBPS);
473+
if (ret)
474+
return ret;
472475

473-
max9271_configure_gmsl_link(&dev->serializer);
476+
ret = max9271_configure_gmsl_link(&dev->serializer);
477+
if (ret)
478+
return ret;
474479

475480
ret = max9271_verify_id(&dev->serializer);
476481
if (ret < 0)

0 commit comments

Comments
 (0)