5d2cd9bdb7602e17bbd2205ec4ff7816379ee718
[openwrt/staging/ldir.git] /
1 From 15f2ddb7175008d14b25b7ab2eb71b487a497327 Mon Sep 17 00:00:00 2001
2 From: Naushir Patuck <naush@raspberrypi.com>
3 Date: Tue, 19 May 2020 16:56:33 +0100
4 Subject: [PATCH] media: i2c: imx477: Return correct result on sensor
5 id verification
6
7 The test should return -EIO if the register read id does not match
8 the expected sensor id.
9
10 Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
11 ---
12 drivers/media/i2c/imx477.c | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15 --- a/drivers/media/i2c/imx477.c
16 +++ b/drivers/media/i2c/imx477.c
17 @@ -1919,7 +1919,7 @@ static int imx477_identify_module(struct
18 if (val != IMX477_CHIP_ID) {
19 dev_err(&client->dev, "chip id mismatch: %x!=%x\n",
20 IMX477_CHIP_ID, val);
21 - ret = -EINVAL;
22 + return -EIO;
23 }
24
25 return 0;