Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1676798pxu; Sun, 6 Dec 2020 03:43:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJxI7GwZpmBi/MwxtlwpIsb89Z9BA91r/UAMknonhgXxJZO6+MXQhraV9MFKxUXnyamNRpxL X-Received: by 2002:a17:906:3d62:: with SMTP id r2mr2598731ejf.295.1607255004855; Sun, 06 Dec 2020 03:43:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607255004; cv=none; d=google.com; s=arc-20160816; b=QgE9FThC7zfuQg9nsNKwThUx46PEpnxBr7VPL4qaMJwrfpKLpJ/NoeyzqQN59VGlb/ HY10p9fb4yhRAaJqVwqLMGQZ3GnsJHciAh4xoK7SOoolO0SttDszi/EngUtxXZNSg4i/ Jpz+PmX3YKLH9wZ7zXr/CGHPtC+7MS4CmlWv8rQRmcESSvEO9fGGwU5BHnArZzFHB7/9 vF3HoExu9STf6xtk/TkzSJLISTz7xAmsMWDix4gJCphJYFDJpzIKa4nNDp83Z5x2H/nU HGsExJnR3kqRmYqUMP4BnOW6hP1j2+574YO5huPvWjPgkdlbC8LSkGsh+cI48cHS0kfT UElg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=v/8rrhV+9z+7bjhWCGX1hGsBmya3HKuNTFlbq2IM/p8=; b=v0jONHio8pZSD+Y+VGKXvtIrks16JZ3L4Lm/qWy+BtZqDOBBJYVSyX4WSa7PPIoV7u bp+5jdVqAGOtZsfMfhB3V67VTQDpbyiaWKyJ7haz6bHk4vlE8W14XDp26Z7a/Z8sT5xZ lBnYRdESKGo9lL/aVAnXhTk9VdAd9XIZ4YbEruNvPdBB2rLPk9De0ORrHMc7UzLfR7YS IfSYKrxmseDgJuQuFTg8V9NGf9RkFU34iqvJ8BWtZ5FZc45i56Oay1FKZ8R7k4+TNaG8 gfiRAzInelhDpuU12uQodWg2ELSmhHJUVr0o5oHy24Jq1fxOxl3wey5iVJvpF7ak5uoP YEdQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r24si4736507eji.211.2020.12.06.03.43.02; Sun, 06 Dec 2020 03:43:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728273AbgLFLjy (ORCPT + 99 others); Sun, 6 Dec 2020 06:39:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:36710 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728108AbgLFLju (ORCPT ); Sun, 6 Dec 2020 06:39:50 -0500 From: Greg Kroah-Hartman Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Zhang Changzhong , Raju Rangoju , Jakub Kicinski Subject: [PATCH 4.14 13/20] cxgb3: fix error return code in t3_sge_alloc_qset() Date: Sun, 6 Dec 2020 12:17:16 +0100 Message-Id: <20201206111556.181241525@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201206111555.569713359@linuxfoundation.org> References: <20201206111555.569713359@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zhang Changzhong [ Upstream commit ff9924897f8bfed82e61894b373ab9d2dfea5b10 ] Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: b1fb1f280d09 ("cxgb3 - Fix dma mapping error path") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Acked-by: Raju Rangoju Link: https://lore.kernel.org/r/1606902965-1646-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/chelsio/cxgb3/sge.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/net/ethernet/chelsio/cxgb3/sge.c +++ b/drivers/net/ethernet/chelsio/cxgb3/sge.c @@ -3111,6 +3111,7 @@ int t3_sge_alloc_qset(struct adapter *ad GFP_KERNEL | __GFP_COMP); if (!avail) { CH_ALERT(adapter, "free list queue 0 initialization failed\n"); + ret = -ENOMEM; goto err; } if (avail < q->fl[0].size)