On Tue Oct 14 19:40:17 2025 +0200, Hans de Goede wrote:
> Many of the functions called from ov01a10_probe() are expected to never
> fail and they should all already log some message if they fail. Remove
> the unnecessarily verbose dev_err[_probe]() calls from the error-exit
> paths in probe().
>
> Signed-off-by: Hans de Goede <[email protected]>
> Tested-by: Mehdi Djait <[email protected]> # Dell XPS 9315
> Reviewed-by: Mehdi Djait <[email protected]>
> Signed-off-by: Sakari Ailus <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>
Patch committed.
Thanks,
Hans Verkuil
drivers/media/i2c/ov01a10.c | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
---
diff --git a/drivers/media/i2c/ov01a10.c b/drivers/media/i2c/ov01a10.c
index 34b7ab6eb286..f7aea9740a53 100644
--- a/drivers/media/i2c/ov01a10.c
+++ b/drivers/media/i2c/ov01a10.c
@@ -781,16 +781,13 @@ static int ov01a10_probe(struct i2c_client *client)
ret = ov01a10_identify_module(ov01a10);
if (ret)
- return dev_err_probe(dev, ret,
- "failed to find sensor\n");
+ return ret;
ov01a10->cur_mode = &supported_modes[0];
ret = ov01a10_init_controls(ov01a10);
- if (ret) {
- dev_err(dev, "failed to init controls: %d\n", ret);
+ if (ret)
return ret;
- }
ov01a10->sd.state_lock = ov01a10->ctrl_handler.lock;
ov01a10->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
@@ -799,16 +796,12 @@ static int ov01a10_probe(struct i2c_client *client)
ov01a10->pad.flags = MEDIA_PAD_FL_SOURCE;
ret = media_entity_pads_init(&ov01a10->sd.entity, 1, &ov01a10->pad);
- if (ret) {
- dev_err(dev, "Failed to init entity pads: %d\n", ret);
+ if (ret)
goto err_handler_free;
- }
ret = v4l2_subdev_init_finalize(&ov01a10->sd);
- if (ret) {
- dev_err(dev, "Failed to allocate subdev state: %d\n", ret);
+ if (ret)
goto err_media_entity_cleanup;
- }
/*
* Device is already turned on by i2c-core with ACPI domain PM.
@@ -819,10 +812,8 @@ static int ov01a10_probe(struct i2c_client *client)
pm_runtime_idle(dev);
ret = v4l2_async_register_subdev_sensor(&ov01a10->sd);
- if (ret < 0) {
- dev_err(dev, "Failed to register subdev: %d\n", ret);
+ if (ret)
goto err_pm_disable;
- }
return 0;
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]