diff options
| author | Xichao Zhao <zhao.xichao@vivo.com> | 2025-08-21 16:06:50 +0800 |
|---|---|---|
| committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2025-08-25 09:40:55 +0100 |
| commit | 7216d7b9beb87f4afd62d737f024254ca3c0746c (patch) | |
| tree | 4fe99f32409c7181b2c995c7741c1809bb560f5e /drivers/iio/proximity/hx9023s.c | |
| parent | 660586969ea3add4a2a29437d89ef5a6d87a5aaa (diff) | |
iio: proximity: 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-7-zhao.xichao@vivo.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/proximity/hx9023s.c')
| -rw-r--r-- | drivers/iio/proximity/hx9023s.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iio/proximity/hx9023s.c b/drivers/iio/proximity/hx9023s.c index 33781c314728..2918dfc0df54 100644 --- a/drivers/iio/proximity/hx9023s.c +++ b/drivers/iio/proximity/hx9023s.c @@ -1141,8 +1141,7 @@ static int hx9023s_probe(struct i2c_client *client) indio_dev->name, iio_device_id(indio_dev)); if (!data->trig) - return dev_err_probe(dev, -ENOMEM, - "iio trigger alloc failed\n"); + return -ENOMEM; data->trig->ops = &hx9023s_trigger_ops; iio_trigger_set_drvdata(data->trig, indio_dev); |
