diff mbox series

iio: adc: exynos: drop unneeded variable assignment

Message ID 20210410164728.8096-1-krzysztof.kozlowski@canonical.com (mailing list archive)
State New, archived
Headers show
Series iio: adc: exynos: drop unneeded variable assignment | expand

Commit Message

Krzysztof Kozlowski April 10, 2021, 4:47 p.m. UTC
The initialization of 'ret' variable in probe function is shortly after
overwritten.  This initialization is simply not used.

Addresses-Coverity: Unused value
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
---
 drivers/iio/adc/exynos_adc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alim Akhtar April 11, 2021, 12:55 p.m. UTC | #1
On Sat, Apr 10, 2021 at 10:18 PM Krzysztof Kozlowski
<krzysztof.kozlowski@canonical.com> wrote:
>
> The initialization of 'ret' variable in probe function is shortly after
> overwritten.  This initialization is simply not used.
>
> Addresses-Coverity: Unused value
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> ---
Thanks Krzysztof,
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>

>  drivers/iio/adc/exynos_adc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c
> index 784c10deeb1a..2d8e36408f0e 100644
> --- a/drivers/iio/adc/exynos_adc.c
> +++ b/drivers/iio/adc/exynos_adc.c
> @@ -794,7 +794,7 @@ static int exynos_adc_probe(struct platform_device *pdev)
>         struct s3c2410_ts_mach_info *pdata = dev_get_platdata(&pdev->dev);
>         struct iio_dev *indio_dev = NULL;
>         bool has_ts = false;
> -       int ret = -ENODEV;
> +       int ret;
>         int irq;
>
>         indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(struct exynos_adc));
> --
> 2.25.1
>
Jonathan Cameron April 11, 2021, 2 p.m. UTC | #2
On Sat, 10 Apr 2021 18:47:28 +0200
Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> wrote:

> The initialization of 'ret' variable in probe function is shortly after
> overwritten.  This initialization is simply not used.
> 
> Addresses-Coverity: Unused value
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>

Too late for this cycle, but I've queued it up for the next one.

Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to see if we missed anything.

Thanks,

Jonathan

> ---
>  drivers/iio/adc/exynos_adc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c
> index 784c10deeb1a..2d8e36408f0e 100644
> --- a/drivers/iio/adc/exynos_adc.c
> +++ b/drivers/iio/adc/exynos_adc.c
> @@ -794,7 +794,7 @@ static int exynos_adc_probe(struct platform_device *pdev)
>  	struct s3c2410_ts_mach_info *pdata = dev_get_platdata(&pdev->dev);
>  	struct iio_dev *indio_dev = NULL;
>  	bool has_ts = false;
> -	int ret = -ENODEV;
> +	int ret;
>  	int irq;
>  
>  	indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(struct exynos_adc));
diff mbox series

Patch

diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c
index 784c10deeb1a..2d8e36408f0e 100644
--- a/drivers/iio/adc/exynos_adc.c
+++ b/drivers/iio/adc/exynos_adc.c
@@ -794,7 +794,7 @@  static int exynos_adc_probe(struct platform_device *pdev)
 	struct s3c2410_ts_mach_info *pdata = dev_get_platdata(&pdev->dev);
 	struct iio_dev *indio_dev = NULL;
 	bool has_ts = false;
-	int ret = -ENODEV;
+	int ret;
 	int irq;
 
 	indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(struct exynos_adc));