diff options
author | Colin Ian King <colin.king@canonical.com> | 2021-03-26 19:28:47 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-03-28 17:51:17 -0700 |
commit | 214037a146ffb796d3f4b012e818360d2bb29f6b (patch) | |
tree | c24408b21b4c3ec6110a73d43eba7ca70a3ab3fb /drivers/net/ethernet/smsc | |
parent | 72642f4127c3b560516127408e8f9b92a56e486e (diff) | |
download | linux-214037a146ffb796d3f4b012e818360d2bb29f6b.tar.bz2 |
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 <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/smsc')
-rw-r--r-- | drivers/net/ethernet/smsc/smc91x.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/smsc/smc91x.c b/drivers/net/ethernet/smsc/smc91x.c index 891b49281bc6..cbde83f620a0 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); |