media: hi556: Don't log hi556_check_hwcfg() errors twice

All hi556_check_hwcfg() error-exit paths already log a detailed reason,
logging a second generic "failed to check HW configuration" error is not
useful, and in case of the fwnode check failing with -EPROBE_DEFER this
is outright problematic flooding the log with:

[    6.336318] hi556 i2c-INT3537:00: failed to check HW configuration: -517
[    6.339006] hi556 i2c-INT3537:00: failed to check HW configuration: -517
[    6.346293] hi556 i2c-INT3537:00: failed to check HW configuration: -517
[    6.356129] hi556 i2c-INT3537:00: failed to check HW configuration: -517
[    6.380316] hi556 i2c-INT3537:00: failed to check HW configuration: -517
etc.

The one exception to all hi556_check_hwcfg() error-exit paths already
logging an error is on v4l2_fwnode_endpoint_alloc_parse() errors.

Make hi556_check_hwcfg() log an error in that case too and drop
the duplicate "failed to check HW configuration" error logging.

Link: https://bugzilla.redhat.com/show_bug.cgi?id=2307279
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@xs4all.nl>
This commit is contained in:
Hans de Goede
2024-12-19 20:27:33 +01:00
committed by Hans Verkuil
parent d846054810
commit c8525bd0a7

View File

@@ -1226,7 +1226,7 @@ static int hi556_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");
ret = fwnode_property_read_u32(fwnode, "clock-frequency", &mclk);
if (ret) {
@@ -1334,11 +1334,8 @@ static int hi556_probe(struct i2c_client *client)
int ret;
ret = hi556_check_hwcfg(&client->dev);
if (ret) {
dev_err(&client->dev, "failed to check HW configuration: %d\n",
ret);
if (ret)
return ret;
}
hi556 = devm_kzalloc(&client->dev, sizeof(*hi556), GFP_KERNEL);
if (!hi556)