]> www.infradead.org Git - users/jedix/linux-maple.git/commit
media: i2c: ov5645: Replace dev_err with dev_err_probe in probe function
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Fri, 18 Oct 2024 15:32:23 +0000 (16:32 +0100)
committerHans Verkuil <hverkuil@xs4all.nl>
Thu, 7 Nov 2024 08:05:59 +0000 (09:05 +0100)
commit82e092fe36761bd3f9883a9411837eb764a6e866
treebb7f5be05ddca32e29c17cff82c661f65eb3e03d
parent3b3a7440607e7981dcdbbf6db88152fd1a5e1037
media: i2c: ov5645: Replace dev_err with dev_err_probe in probe function

Refactor error handling in the ov5645_probe() function by replacing
multiple dev_err() calls with dev_err_probe().

- Note that during this process, the error string "external clock
  frequency %u is not supported" was replaced with "unsupported xclk
  frequency %u" to ensure it wraps at 80 columns.
- Additionally, the error string for control initialization failure was
  changed from "%s: control initialization error %d\n" to "failed to add
  controls\n" as there is no need to print the function name and error code
  in the string, since dev_err_probe() already provides this information.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/i2c/ov5645.c