From: Markus Elfring Date: Sat, 29 Nov 2014 13:34:59 +0000 (+0100) Subject: net: cassini: Deletion of an unnecessary check before the function call "vfree" X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=39af455daf0fda8fb71123b101ba21209173f37e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: David S. Miller --- 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);