linux/drivers/media
Fabio Estevam 49a9bad83b media: ov2680: Clear the 'ret' variable on success
Since commit 63b0cd30b7 ("media: ov2680: Add bus-cfg / endpoint
property verification") even when the correct 'link-frequencies'
property is passed in the devicetree, the driver fails to probe:

ov2680 1-0036: probe with driver ov2680 failed with error -22

The reason is that the variable 'ret' may contain the -EINVAL value
from a previous assignment:

ret = fwnode_property_read_u32(dev_fwnode(dev), "clock-frequency",
			       &rate);

Fix the problem by clearing 'ret' on the successful path.

Tested on imx7s-warp board with the following devicetree:

port {
	ov2680_to_mipi: endpoint {
		remote-endpoint = <&mipi_from_sensor>;
		clock-lanes = <0>;
		data-lanes = <1>;
		link-frequencies = /bits/ 64 <330000000>;
	};
};

Cc: stable@vger.kernel.org
Fixes: 63b0cd30b7 ("media: ov2680: Add bus-cfg / endpoint property verification")
Suggested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-04-10 15:15:30 +02:00
..
cec media: platform: cros-ec: provide ID table for avoiding fallback match 2024-04-08 13:48:19 +02:00
common media: v4l2: Add REMOVE_BUFS ioctl 2024-03-25 12:00:44 +01:00
dvb-core media: dvbdev: Initialize sbuf 2024-04-08 13:48:19 +02:00
dvb-frontends media: cxd2880: Add terminating new line to Kconfig 2024-04-08 13:48:18 +02:00
firewire
i2c media: ov2680: Clear the 'ret' variable on success 2024-04-10 15:15:30 +02:00
mc media: mc: Expand MUST_CONNECT flag to always require an enabled link 2024-02-05 14:29:34 +01:00
mmc media: mmc: siano: simplify module initialization 2024-04-08 13:48:19 +02:00
pci media: ipu3-cio2: Request IRQ earlier 2024-04-10 15:15:30 +02:00
platform media: vpif_display: Use pad variant of dv timing subdev calls 2024-04-09 08:15:04 +02:00
radio media: radio-shark2: Avoid led_names truncations 2024-04-08 13:48:19 +02:00
rc media: imon: Convert sprintf/snprintf to sysfs_emit 2024-03-25 10:13:44 +01:00
spi media: spi: gs1662: Switch dv timing callbacks to pad ops 2024-04-09 08:15:04 +02:00
test-drivers media: v4l2: Add mem2mem helpers for REMOVE_BUFS ioctl 2024-03-25 12:00:44 +01:00
tuners media: tda18271: remove redundant assignment to variable bcal 2024-02-16 11:46:32 +01:00
usb media: anysee: accept read buffers of length 1 in anysee_master_xfer 2024-04-08 13:48:18 +02:00
v4l2-core media: v4l: async: Properly re-initialise notifier entry in unregister 2024-04-10 15:15:30 +02:00
Kconfig
Makefile