Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: imu: bmi323: Remove dev_err_probe() if error is -ENOMEM

The dev_err_probe() doesn't do anything when the error is '-ENOMEM'.
Therefore, remove the useless call to dev_err_probe(), and just return the
value instead.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://patch.msgid.link/20250821080723.525379-5-zhao.xichao@vivo.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Xichao Zhao and committed by
Jonathan Cameron
d3a7db87 e407199c

+1 -2
+1 -2
drivers/iio/imu/bmi323/bmi323_core.c
··· 2112 2112 2113 2113 indio_dev = devm_iio_device_alloc(dev, sizeof(*data)); 2114 2114 if (!indio_dev) 2115 - return dev_err_probe(dev, -ENOMEM, 2116 - "Failed to allocate device\n"); 2115 + return -ENOMEM; 2117 2116 2118 2117 ret = devm_regulator_bulk_get_enable(dev, ARRAY_SIZE(regulator_names), 2119 2118 regulator_names);