hwmon: (iio_hwmon) use dev_err_probe
authorAlexander Stein <alexander.stein@ew.tq-group.com>
Tue, 31 Jan 2023 10:33:59 +0000 (11:33 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Fri, 3 Feb 2023 15:30:11 +0000 (07:30 -0800)
commit1c999af509b3f834d3d65a90fb72860a6d6a8370
treec3a775a1f417dc271a0ea24fc8a9b2db75bb7355
parente1983220ae14ae7bdc8db4fb64e78bb55122c32b
hwmon: (iio_hwmon) use dev_err_probe

Instead of just returning an error code, add an error message as well.
While at it, simplify the code and use a common return path.
Upon deferral this also nicely lists the following message in
/sys/kernel/debug/devices_deferred:
adc     iio_hwmon: Failed to get channels

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Link: https://lore.kernel.org/r/20230131103359.625081-1-alexander.stein@ew.tq-group.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/iio_hwmon.c