Re: [PATCH v2 27/28] media: ov2680: Read and log sensor revision during probe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 15, 2023 at 04:13:48PM +0200, Hans de Goede wrote:
> Read and log sensor revision during probe.
> 
> Since this means that the driver will now already log a message on
> successful probe drop the "ov2680 init correctly" log message.

...

> -	ret = cci_read(sensor->regmap, OV2680_REG_CHIP_ID, &chip_id, NULL);
> +	cci_read(sensor->regmap, OV2680_REG_CHIP_ID, &chip_id, &ret);
> +	cci_read(sensor->regmap, OV2680_REG_SC_CMMN_SUB_ID, &rev, &ret);
>  	if (ret < 0) {
>  		dev_err(sensor->dev, "failed to read chip id\n");
>  		return -ENODEV;

Even in the original code I don't see justification why the error code should
be shadowed.

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux