From: Xichao Zhao Date: Thu, 21 Aug 2025 08:06:48 +0000 (+0800) Subject: iio: imu: bmi323: Remove dev_err_probe() if error is -ENOMEM X-Git-Tag: v6.18-rc1~74^2~7^2~94 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d3a7db87dad680b87473bd5d79139142cb88bbde;p=thirdparty%2Fkernel%2Fstable.git 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 Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/20250821080723.525379-5-zhao.xichao@vivo.com Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/imu/bmi323/bmi323_core.c b/drivers/iio/imu/bmi323/bmi323_core.c index fc54d464a3ae9..6bcb9a4365813 100644 --- a/drivers/iio/imu/bmi323/bmi323_core.c +++ b/drivers/iio/imu/bmi323/bmi323_core.c @@ -2112,8 +2112,7 @@ int bmi323_core_probe(struct device *dev) indio_dev = devm_iio_device_alloc(dev, sizeof(*data)); if (!indio_dev) - return dev_err_probe(dev, -ENOMEM, - "Failed to allocate device\n"); + return -ENOMEM; ret = devm_regulator_bulk_get_enable(dev, ARRAY_SIZE(regulator_names), regulator_names);