cxgb4: Fix return value check in cfg_queues_uld()

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

Fixes: 94cdb8bb99 ("cxgb4: Add support for dynamic allocation of
resources for ULD")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Wei Yongjun 2016-09-17 15:52:17 +00:00 committed by David S. Miller
parent 4646651e75
commit 106323b905
1 changed files with 1 additions and 1 deletions

View File

@ -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);
if (!rxq_info->uldrxq) {
if (!rxq_info->rspq_id) {
kfree(rxq_info->uldrxq);
kfree(rxq_info);
return -ENOMEM;