Re: [PATCH v1] ov5675: Add support for OV5675 sensor

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

 



Hi Shawn,

Thanks for the patch. A few comments below.

On Wed, Jul 31, 2019 at 06:53:36PM +0800, Shawnx Tu wrote:

...

> +static int ov5675_check_hwcfg(struct device *dev)
> +{
> +	struct fwnode_handle *ep;
> +	struct fwnode_handle *fwnode = dev_fwnode(dev);
> +	struct v4l2_fwnode_endpoint bus_cfg = {
> +		.bus_type = V4L2_MBUS_CSI2_DPHY
> +	};
> +	u32 mclk;
> +	int ret;
> +	unsigned int i, j;
> +
> +	if (!fwnode)
> +		return -ENXIO;
> +
> +	fwnode_property_read_u32(fwnode, "clock-frequency", &mclk);

Please check reading the property succeeded. Otherwise mclk will be
uninitialised.

Apart from that, this seems good.

-- 
Kind regards,

Sakari Ailus
sakari.ailus@xxxxxxxxxxxxxxx



[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