lkml.org 
[lkml]   [2024]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH][next] iio: adc: ti-ads7950: remove redundant assignment to variable ret
Date
Variable ret is being assigned a value that is never read, the variable
is being re-assigned again a few statements later. Remove it.

Cleans up clang scan build warning:
warning: Value stored to 'ret' is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/iio/adc/ti-ads7950.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/iio/adc/ti-ads7950.c b/drivers/iio/adc/ti-ads7950.c
index 263fc3a1b87e..f975de059ba0 100644
--- a/drivers/iio/adc/ti-ads7950.c
+++ b/drivers/iio/adc/ti-ads7950.c
@@ -441,8 +441,6 @@ static int ti_ads7950_get(struct gpio_chip *chip, unsigned int offset)
if (ret)
goto out;

- ret = ((st->single_rx >> 12) & BIT(offset)) ? 1 : 0;
-
/* Revert back to original settings */
st->cmd_settings_bitmask &= ~TI_ADS7950_CR_GPIO_DATA;
st->single_tx = TI_ADS7950_MAN_CMD_SETTINGS(st);
--
2.39.2

\
 
 \ /
  Last update: 2024-01-06 16:24    [W:0.097 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site