mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH][next] media: cx231xx: remove redundant assignment to variable value
@ 2024-11-13 14:42 Colin Ian King
  0 siblings, 0 replies; only message in thread
From: Colin Ian King @ 2024-11-13 14:42 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Hans Verkuil, linux-media
  Cc: kernel-janitors, linux-kernel

The variable value is being assigned a value that is never read
afterwards, the following if statement re-assigns it with a new
value in both paths of the if statement. The assignment is
redundant and can be removed.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/media/usb/cx231xx/cx231xx-avcore.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/media/usb/cx231xx/cx231xx-avcore.c b/drivers/media/usb/cx231xx/cx231xx-avcore.c
index 6139ef5d891d..1cfec76b72f3 100644
--- a/drivers/media/usb/cx231xx/cx231xx-avcore.c
+++ b/drivers/media/usb/cx231xx/cx231xx-avcore.c
@@ -2701,13 +2701,12 @@ int cx231xx_set_gpio_value(struct cx231xx *dev, int pin_number, int pin_value)
 	if ((dev->gpio_dir & (1 << pin_number)) == 0x00) {
 		/* It was in input mode */
 		value = dev->gpio_dir | (1 << pin_number);
 		dev->gpio_dir = value;
 		status = cx231xx_set_gpio_bit(dev, dev->gpio_dir,
 					      dev->gpio_val);
-		value = 0;
 	}
 
 	if (pin_value == 0)
 		value = dev->gpio_val & (~(1 << pin_number));
 	else
 		value = dev->gpio_val | (1 << pin_number);
-- 
2.39.5


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-11-13 14:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-13 14:42 [PATCH][next] media: cx231xx: remove redundant assignment to variable value Colin Ian King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®