From: Colin Ian King Date: Fri, 26 Mar 2021 19:28:47 +0000 (+0000) Subject: drivers: net: smc91x: remove redundant initialization of pointer gpio X-Git-Tag: accepted/tizen/unified/20230118.172025~7335^2~344 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=214037a146ffb796d3f4b012e818360d2bb29f6b;p=platform%2Fkernel%2Flinux-rpi.git drivers: net: smc91x: remove redundant initialization of pointer gpio The pointer gpio is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/smsc/smc91x.c b/drivers/net/ethernet/smsc/smc91x.c index 891b492..cbde83f 100644 --- a/drivers/net/ethernet/smsc/smc91x.c +++ b/drivers/net/ethernet/smsc/smc91x.c @@ -2204,7 +2204,7 @@ static int try_toggle_control_gpio(struct device *dev, const char *name, int index, int value, unsigned int nsdelay) { - struct gpio_desc *gpio = *desc; + struct gpio_desc *gpio; enum gpiod_flags flags = value ? GPIOD_OUT_LOW : GPIOD_OUT_HIGH; gpio = devm_gpiod_get_index_optional(dev, name, index, flags);