summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2019-07-05 13:37:32 +0300
committerKalle Valo <kvalo@codeaurora.org>2019-07-24 14:45:24 +0300
commitc032461936de82a3f4108cacc7c3d1b204c42eef (patch)
tree0a99a98a66327ef6fa423ea28b2554a55f1a96f1
parent4c8a468510196ff0a2c5ea28e8c27cd543a95861 (diff)
downloadlinux-c032461936de82a3f4108cacc7c3d1b204c42eef.tar.xz
wl3501_cs: remove redundant variable rc
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>
-rw-r--r--drivers/net/wireless/wl3501_cs.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
index a25b17932edb..007bf6803293 100644
--- a/drivers/net/wireless/wl3501_cs.c
+++ b/drivers/net/wireless/wl3501_cs.c
@@ -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;
}
/**