bcm27xx: update patches from RPi foundation
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.4 / 950-0755-media-i2c-imx477-Return-correct-result-on-sensor-id-.patch
1 From 7048ac9fd3b918d83a71caf5c94bb061a2866794 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;