From: Dan Carpenter Date: Tue, 8 Nov 2011 03:31:44 +0000 (-0800) Subject: mwifiex: remove unneeded kfree(NULL); X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fba6fe634787bb7ef95fb44682df71b4d4e8cb2d;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git mwifiex: remove unneeded kfree(NULL); The previous if statement means this that pointer is NULL so there is no need to free it. Signed-off-by: Dan Carpenter Acked-by: Bing Zhao Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c index d34acf082d3a..44669763c4e6 100644 --- a/drivers/net/wireless/mwifiex/pcie.c +++ b/drivers/net/wireless/mwifiex/pcie.c @@ -386,7 +386,6 @@ static int mwifiex_pcie_create_txbd_ring(struct mwifiex_adapter *adapter) card->txbd_ring_vbase = kzalloc(card->txbd_ring_size, GFP_KERNEL); if (!card->txbd_ring_vbase) { dev_err(adapter->dev, "Unable to allocate buffer for txbd ring.\n"); - kfree(card->txbd_ring_vbase); return -1; } card->txbd_ring_pbase = virt_to_phys(card->txbd_ring_vbase);