summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2014-11-29 14:34:59 +0100
committerDavid S. Miller <davem@davemloft.net>2014-12-06 06:14:19 +0100
commit39af455daf0fda8fb71123b101ba21209173f37e (patch)
tree87f1b1e2a78b24248e77c743f6f8bbe6c87c75e5
parentstmmac: pci: allocate memory resources dynamically (diff)
downloadlinux-39af455daf0fda8fb71123b101ba21209173f37e.tar.xz
linux-39af455daf0fda8fb71123b101ba21209173f37e.zip
net: cassini: Deletion of an unnecessary check before the function call "vfree"
The vfree() function performs also input parameter validation. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/sun/cassini.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/sun/cassini.c b/drivers/net/ethernet/sun/cassini.c
index 02d370e58110..3dc1f68b322d 100644
--- a/drivers/net/ethernet/sun/cassini.c
+++ b/drivers/net/ethernet/sun/cassini.c
@@ -5179,8 +5179,7 @@ static void cas_remove_one(struct pci_dev *pdev)
cp = netdev_priv(dev);
unregister_netdev(dev);
- if (cp->fw_data)
- vfree(cp->fw_data);
+ vfree(cp->fw_data);
mutex_lock(&cp->pm_mutex);
cancel_work_sync(&cp->reset_task);