mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
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>
This commit is contained in:
parent
47913c1f55
commit
41543c7ccc
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user