From 1db3cd79a6704e3e70e1da0548513b0be1a71599 Mon Sep 17 00:00:00 2001 From: Kevin Cheng Date: Tue, 3 Dec 2024 16:35:30 +0800 Subject: [PATCH] media: i2c: ov02c10: Probe defer while chip id is zero The chip id may be zero while the resource is not ready. Put the driver to probe defer for retry. Signed-off-by: Kevin Cheng --- drivers/media/i2c/ov02c10.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/i2c/ov02c10.c b/drivers/media/i2c/ov02c10.c index 0a1fed161f3f..af87b5c81c3f 100644 --- a/drivers/media/i2c/ov02c10.c +++ b/drivers/media/i2c/ov02c10.c @@ -1511,6 +1511,9 @@ static int ov02c10_identify_module(struct ov02c10 *ov02c10) if (ret) return ret; + if (val == 0) + return -EPROBE_DEFER; + if (val != OV02C10_CHIP_ID) { dev_err(&client->dev, "chip id mismatch: %x!=%x", OV02C10_CHIP_ID, val);