diff options
author | Alexander Stein <alexander.stein@ew.tq-group.com> | 2022-12-13 15:07:27 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2023-02-06 08:36:03 +0100 |
commit | e1610209a8879e7bc6a4910f93b071cf6d91cbef (patch) | |
tree | f1fc7a43c4b855a876264af2320313066198cde9 /drivers/media/i2c/ov9282.c | |
parent | media: i2c: ov9282: remove unused and unset i2c_client member (diff) | |
download | linux-e1610209a8879e7bc6a4910f93b071cf6d91cbef.tar.xz linux-e1610209a8879e7bc6a4910f93b071cf6d91cbef.zip |
media: i2c: ov9282: Switch to use dev_err_probe helper
In the probe path, dev_err() can be replaced with dev_err_probe()
which will check if error code is -EPROBE_DEFER and prints the
error name. It also sets the defer probe reason which can be
checked later through debugfs. It's more simple in error path.
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/i2c/ov9282.c')
-rw-r--r-- | drivers/media/i2c/ov9282.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/media/i2c/ov9282.c b/drivers/media/i2c/ov9282.c index 8216644494bb..7f46cac38aab 100644 --- a/drivers/media/i2c/ov9282.c +++ b/drivers/media/i2c/ov9282.c @@ -1142,10 +1142,9 @@ static int ov9282_parse_hw_config(struct ov9282 *ov9282) } ret = ov9282_configure_regulators(ov9282); - if (ret) { - dev_err(ov9282->dev, "Failed to get power regulators\n"); - return ret; - } + if (ret) + return dev_err_probe(ov9282->dev, ret, + "Failed to get power regulators\n"); rate = clk_get_rate(ov9282->inclk); if (rate != OV9282_INCLK_RATE) { |