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

Configure Feed

Select the types of activity you want to include in your feed.

iio: chemical: 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: Gustavo Silva <gustavograzs@gmail.com> # for ens160
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://patch.msgid.link/20250821080723.525379-4-zhao.xichao@vivo.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Xichao Zhao and committed by
Jonathan Cameron
e407199c 3a4cdd11

+2 -3
+1 -2
drivers/iio/chemical/ens160_core.c
··· 305 305 trig = devm_iio_trigger_alloc(dev, "%s-dev%d", indio_dev->name, 306 306 iio_device_id(indio_dev)); 307 307 if (!trig) 308 - return dev_err_probe(dev, -ENOMEM, 309 - "failed to allocate trigger\n"); 308 + return -ENOMEM; 310 309 311 310 trig->ops = &ens160_trigger_ops; 312 311 iio_trigger_set_drvdata(trig, indio_dev);
+1 -1
drivers/iio/chemical/scd30_core.c
··· 635 635 trig = devm_iio_trigger_alloc(dev, "%s-dev%d", indio_dev->name, 636 636 iio_device_id(indio_dev)); 637 637 if (!trig) 638 - return dev_err_probe(dev, -ENOMEM, "failed to allocate trigger\n"); 638 + return -ENOMEM; 639 639 640 640 trig->ops = &scd30_trigger_ops; 641 641 iio_trigger_set_drvdata(trig, indio_dev);