summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sun
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-05 21:14:19 -0800
commit39af455daf0fda8fb71123b101ba21209173f37e (patch)
tree87f1b1e2a78b24248e77c743f6f8bbe6c87c75e5 /drivers/net/ethernet/sun
parentc4b2b9a849eaf892fa53bf7fa90c67613ceb83c2 (diff)
downloadtalos-op-linux-39af455daf0fda8fb71123b101ba21209173f37e.tar.gz
talos-op-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>
Diffstat (limited to 'drivers/net/ethernet/sun')
-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);
OpenPOWER on IntegriCloud