summaryrefslogtreecommitdiffstats
path: root/drivers/iio/light
diff options
context:
space:
mode:
authorRuan Jinjie <ruanjinjie@huawei.com>2023-07-27 09:39:12 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2023-07-29 13:13:17 +0200
commit089c1e1132c86c668a19e8cbfab0faffe0220643 (patch)
treeb8790903a40a60e152206908b3562668080a6c55 /drivers/iio/light
parentiio: adc: Explicitly include correct DT includes (diff)
downloadlinux-089c1e1132c86c668a19e8cbfab0faffe0220643.tar.xz
linux-089c1e1132c86c668a19e8cbfab0faffe0220643.zip
iio: adc: Remove redundant dev_err_probe()
There is no need to call the dev_err() function directly to print a custom message when handling an error from either the platform_get_irq() or platform_get_irq_byname() functions as both are going to display an appropriate error message in case of a failure. Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Heiko Stuebner <heiko@sntech.de> Link: https://lore.kernel.org/r/20230727073912.4178659-1-ruanjinjie@huawei.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/light')
-rw-r--r--drivers/iio/light/cm3605.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/light/cm3605.c b/drivers/iio/light/cm3605.c
index 0b30db77f78b..e7f0b81b7f5a 100644
--- a/drivers/iio/light/cm3605.c
+++ b/drivers/iio/light/cm3605.c
@@ -227,7 +227,7 @@ static int cm3605_probe(struct platform_device *pdev)
irq = platform_get_irq(pdev, 0);
if (irq < 0) {
- ret = dev_err_probe(dev, irq, "failed to get irq\n");
+ ret = irq;
goto out_disable_aset;
}