media: i2c: imx477: Return correct result on sensor id verification
authorNaushir Patuck <naush@raspberrypi.com>
Tue, 19 May 2020 15:56:33 +0000 (16:56 +0100)
committerpopcornmix <popcornmix@gmail.com>
Wed, 1 Jul 2020 15:34:05 +0000 (16:34 +0100)
The test should return -EIO if the register read id does not match
the expected sensor id.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
drivers/media/i2c/imx477.c

index bd0e2c2..e42a863 100644 (file)
@@ -1919,7 +1919,7 @@ static int imx477_identify_module(struct imx477 *imx477)
        if (val != IMX477_CHIP_ID) {
                dev_err(&client->dev, "chip id mismatch: %x!=%x\n",
                        IMX477_CHIP_ID, val);
-               ret = -EINVAL;
+               return -EIO;
        }
 
        return 0;