On Fri Apr 25 14:52:38 2025 +0200, Johan Hovold wrote: > Probe deferral should not be logged as an error: > > ov8856 24-0010: failed to get HW configuration: -517 > > Use dev_err_probe() for the clock lookup and drop the (mostly) redundant > dev_err() from sensor probe() to suppress it. > > Note that errors during regulator lookup is already correctly logged > using dev_err_probe(). > > Fixes: 0c2c7a1e0d69 ("media: ov8856: Add devicetree support") > Cc: sta...@vger.kernel.org > Signed-off-by: Johan Hovold <johan+lin...@kernel.org> > Signed-off-by: Sakari Ailus <sakari.ai...@linux.intel.com> > Signed-off-by: Hans Verkuil <hverk...@xs4all.nl>
Patch committed. Thanks, Hans Verkuil drivers/media/i2c/ov8856.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) --- diff --git a/drivers/media/i2c/ov8856.c b/drivers/media/i2c/ov8856.c index e6704d018248..4b6874d2a104 100644 --- a/drivers/media/i2c/ov8856.c +++ b/drivers/media/i2c/ov8856.c @@ -2276,8 +2276,8 @@ static int ov8856_get_hwcfg(struct ov8856 *ov8856, struct device *dev) if (!is_acpi_node(fwnode)) { ov8856->xvclk = devm_clk_get(dev, "xvclk"); if (IS_ERR(ov8856->xvclk)) { - dev_err(dev, "could not get xvclk clock (%pe)\n", - ov8856->xvclk); + dev_err_probe(dev, PTR_ERR(ov8856->xvclk), + "could not get xvclk clock\n"); return PTR_ERR(ov8856->xvclk); } @@ -2382,11 +2382,8 @@ static int ov8856_probe(struct i2c_client *client) return -ENOMEM; ret = ov8856_get_hwcfg(ov8856, &client->dev); - if (ret) { - dev_err(&client->dev, "failed to get HW configuration: %d", - ret); + if (ret) return ret; - } v4l2_i2c_subdev_init(&ov8856->sd, client, &ov8856_subdev_ops);