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-Tag: v4.9.8~5202^2~97 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=39af455daf0fda8fb71123b101ba21209173f37e;p=platform%2Fkernel%2Flinux-rpi3.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 02d370e..3dc1f68 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);