On Thu, Jan 22, 2026 at 04:17:59PM +0000, Russell King (Oracle) wrote:
On Thu, Jan 22, 2026 at 04:54:11PM +0200, Andy Shevchenko wrote:
quoted
On Thu, Jan 22, 2026 at 03:42:45PM +0200, Vladimir Oltean wrote:
quoted
I never understood the point of dev_err_probe() when you know the return
code can never be -EPROBE_DEFER.
i) Smaller code; ii) no need to care about: a) deferred probe cases;
b) -ENOMEM cases. I see only benefits here by using it.
Isn't it also used for /sys/kernel/debug/devices_deferred to report to
the user ?
E.g.
supply-voltage-monitor iio_hwmon: Failed to get channels
produced by drivers/hwmon/iio_hwmon.c::iio_hwmon_probe():
channels = devm_iio_channel_get_all(dev);
if (IS_ERR(channels)) {
ret = PTR_ERR(channels);
if (ret == -ENODEV)
ret = -EPROBE_DEFER;
return dev_err_probe(dev, ret,
"Failed to get channels\n");
}
Yes, that's what I imply by "deferred probe cases".
--
With Best Regards,
Andy Shevchenko