Commit 106323b9 authored by Wei Yongjun's avatar Wei Yongjun Committed by David S. Miller

cxgb4: Fix return value check in cfg_queues_uld()

Fix the retrn value check which testing the wrong variable
in cfg_queues_uld().

Fixes: 94cdb8bb ("cxgb4: Add support for dynamic allocation of
resources for ULD")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4646651e
...@@ -308,7 +308,7 @@ int cfg_queues_uld(struct adapter *adap, unsigned int uld_type, ...@@ -308,7 +308,7 @@ int cfg_queues_uld(struct adapter *adap, unsigned int uld_type,
} }
rxq_info->rspq_id = kcalloc(nrxq, sizeof(unsigned short), GFP_KERNEL); rxq_info->rspq_id = kcalloc(nrxq, sizeof(unsigned short), GFP_KERNEL);
if (!rxq_info->uldrxq) { if (!rxq_info->rspq_id) {
kfree(rxq_info->uldrxq); kfree(rxq_info->uldrxq);
kfree(rxq_info); kfree(rxq_info);
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment