47d490fc47740866f5271bc6ec8ec8afe9786ab4
[openwrt/staging/hauke.git] /
1 From 4f6d901936f956afba1253f1fba337cf49957e2f 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;