diff options
| author | Waqar Hameed <waqar.hameed@axis.com> | 2025-08-05 11:33:33 +0200 |
|---|---|---|
| committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2025-08-16 11:57:08 +0100 |
| commit | 65e8202f03224d56896202610a5875060bb775d9 (patch) | |
| tree | 3a849d5c01fd668e03036dede0d98a3e52a9b226 /drivers/iio/frequency | |
| parent | b515c701bbdfa453e2e57ae542863f1baf2c35b1 (diff) | |
| download | linux-65e8202f03224d56896202610a5875060bb775d9.tar.gz linux-65e8202f03224d56896202610a5875060bb775d9.tar.bz2 linux-65e8202f03224d56896202610a5875060bb775d9.zip | |
iio: Remove error prints for devm_add_action_or_reset()
When `devm_add_action_or_reset()` fails, it is due to a failed memory
allocation and will thus return `-ENOMEM`. `dev_err_probe()` doesn't do
anything when error is `-ENOMEM`. Therefore, remove the useless call to
`dev_err_probe()` when `devm_add_action_or_reset()` fails, and just
return the value instead.
Signed-off-by: Waqar Hameed <waqar.hameed@axis.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://patch.msgid.link/pndectqm7te.a.out@axis.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/frequency')
| -rw-r--r-- | drivers/iio/frequency/adf4350.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iio/frequency/adf4350.c b/drivers/iio/frequency/adf4350.c index 47f1c7e9efa9..6665409a9a87 100644 --- a/drivers/iio/frequency/adf4350.c +++ b/drivers/iio/frequency/adf4350.c @@ -673,8 +673,7 @@ static int adf4350_probe(struct spi_device *spi) ret = devm_add_action_or_reset(&spi->dev, adf4350_power_down, indio_dev); if (ret) - return dev_err_probe(&spi->dev, ret, - "Failed to add action to managed power down\n"); + return ret; return devm_iio_device_register(&spi->dev, indio_dev); } |
