projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4b2b9a
)
net: cassini: Deletion of an unnecessary check before the function call "vfree"
author
Markus Elfring
<
[email protected]
>
Sat, 29 Nov 2014 13:34:59 +0000
(14:34 +0100)
committer
David S. Miller
<
[email protected]
>
Sat, 6 Dec 2014 05:14:19 +0000
(21:14 -0800)
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 <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/ethernet/sun/cassini.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/sun/cassini.c
b/drivers/net/ethernet/sun/cassini.c
index 02d370e58110de31b74d1d1b89f4038b7b476a3f..3dc1f68b322d357d14a915a115d92ebef8fef9a2 100644
(file)
--- 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);