wl3501_cs: remove redundant variable rc
authorColin Ian King <colin.king@canonical.com>
Fri, 5 Jul 2019 10:37:32 +0000 (11:37 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 24 Jul 2019 11:45:24 +0000 (14:45 +0300)
The variable rc is being initialized with a value that is never
read and it is being updated later with a new value that is returned.
The variable is redundant and can be replaced with a return 0 as
there are no other return points in this function.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/wl3501_cs.c

index a25b179..007bf68 100644 (file)
@@ -1226,7 +1226,6 @@ fail:
 static int wl3501_close(struct net_device *dev)
 {
        struct wl3501_card *this = netdev_priv(dev);
-       int rc = -ENODEV;
        unsigned long flags;
        struct pcmcia_device *link;
        link = this->p_dev;
@@ -1241,10 +1240,9 @@ static int wl3501_close(struct net_device *dev)
        /* Mask interrupts from the SUTRO */
        wl3501_block_interrupt(this);
 
-       rc = 0;
        printk(KERN_INFO "%s: WL3501 closed\n", dev->name);
        spin_unlock_irqrestore(&this->lock, flags);
-       return rc;
+       return 0;
 }
 
 /**