diff options
author | Hans de Goede <hdegoede@redhat.com> | 2023-12-04 13:39:41 +0100 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2023-12-13 13:21:20 +0100 |
commit | 41543c7ccc682f7ec713dbe19be67fa694088f9c (patch) | |
tree | f58a9d3f0dc8eefb060de606a0165e8a24574fb2 | |
parent | 47913c1f554c31350af36130b208a0bf7754e8d0 (diff) | |
download | lwn-41543c7ccc682f7ec713dbe19be67fa694088f9c.tar.gz lwn-41543c7ccc682f7ec713dbe19be67fa694088f9c.zip |
media: ov2740: Improve ov2740_check_hwcfg() error reporting
Make ov2740_check_hwcfg() report an error on failure in all error paths,
so that it is always clear why the probe() failed.
Signed-off-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>
-rw-r--r-- | drivers/media/i2c/ov2740.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/i2c/ov2740.c b/drivers/media/i2c/ov2740.c index 06427e886d15..1cbe0ac16995 100644 --- a/drivers/media/i2c/ov2740.c +++ b/drivers/media/i2c/ov2740.c @@ -940,7 +940,8 @@ static int ov2740_check_hwcfg(struct device *dev) ret = fwnode_property_read_u32(fwnode, "clock-frequency", &mclk); if (ret) { fwnode_handle_put(ep); - return ret; + return dev_err_probe(dev, ret, + "reading clock-frequency property\n"); } if (mclk != OV2740_MCLK) { @@ -953,7 +954,7 @@ static int ov2740_check_hwcfg(struct device *dev) ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg); fwnode_handle_put(ep); if (ret) - return ret; + return dev_err_probe(dev, ret, "parsing endpoint failed\n"); if (bus_cfg.bus.mipi_csi2.num_data_lanes != OV2740_DATA_LANES) { ret = dev_err_probe(dev, -EINVAL, |