提交 fba6fe63 编写于 作者: D Dan Carpenter 提交者: John W. Linville

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: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NBing Zhao <bzhao@marvell.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 1bac92ca
...@@ -386,7 +386,6 @@ static int mwifiex_pcie_create_txbd_ring(struct mwifiex_adapter *adapter) ...@@ -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); card->txbd_ring_vbase = kzalloc(card->txbd_ring_size, GFP_KERNEL);
if (!card->txbd_ring_vbase) { if (!card->txbd_ring_vbase) {
dev_err(adapter->dev, "Unable to allocate buffer for txbd ring.\n"); dev_err(adapter->dev, "Unable to allocate buffer for txbd ring.\n");
kfree(card->txbd_ring_vbase);
return -1; return -1;
} }
card->txbd_ring_pbase = virt_to_phys(card->txbd_ring_vbase); card->txbd_ring_pbase = virt_to_phys(card->txbd_ring_vbase);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册