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 <[email protected]> Reviewed-by: Kieran Bingham <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 59a81c7 commit 47f8b8a

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

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)