mwifiex: remove unneeded kfree(NULL);
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 8 Nov 2011 03:31:44 +0000 (19:31 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 9 Nov 2011 21:14:11 +0000 (16:14 -0500)
The previous if statement means this that pointer is NULL so there
is no need to free it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/pcie.c

index d34acf082d3ae03fdc0b35b58f19a924415915a0..44669763c4e6aa2021cdfd1ceadfa2aa4f65f88c 100644 (file)
@@ -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);