Skip to content

Commit

Permalink
net: cassini: Deletion of an unnecessary check before the function ca…
Browse files Browse the repository at this point in the history
…ll "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>
  • Loading branch information
Markus Elfring authored and David S. Miller committed Dec 6, 2014
1 parent c4b2b9a commit 39af455
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ethernet/sun/cassini.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 39af455

Please sign in to comment.