From: Wei Yongjun Date: Sat, 17 Sep 2016 15:52:17 +0000 (+0000) Subject: cxgb4: Fix return value check in cfg_queues_uld() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=106323b905a6bcd21ff83dd4e19566282fd5eb52;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git cxgb4: Fix return value check in cfg_queues_uld() Fix the retrn value check which testing the wrong variable in cfg_queues_uld(). Fixes: 94cdb8bb993a ("cxgb4: Add support for dynamic allocation of resources for ULD") Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c index fc04e3b878e8..d12a73e03565 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c @@ -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;