Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1679306pxu; Sun, 6 Dec 2020 03:49:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJxv1niyZ+cYKriN//McYcN1F3mgl62N48N08gdTsxQ6TooANc4i88dch2rHJZmsGrGx8PfQ X-Received: by 2002:a17:906:4705:: with SMTP id y5mr14764096ejq.112.1607255370157; Sun, 06 Dec 2020 03:49:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607255370; cv=none; d=google.com; s=arc-20160816; b=XqgiSiK/pwMz7xYSgRUvHZvr3fBH4fy6qRQy2lGEet3Txwj/lx/Luqm1iFmycecnUe Dtm2T+oKdIrWkMA8EsVOBHgjbh57VAmHDgF/EmqJwMpZMqUaey++8mAltGMX1gKlDUfm PvrEa+mdH50He7CHdeConbaWwD7lewi+xDt6LhcBPbR4M7GfIbuZgUFI1DytCGMr77Zi Yk+O59r6a+9lAobLElB/aALq9rvisO4xfl84ddM7tZwsR/iGhtHhxRExxAgBYweAigyH I4Z8aFoJJu0WTipgG8pwWde4fcB7PRhmc58nbmLtLXudsRGdY2X/gaM4jjqV5CKXTofI M1KA== 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=8r2S1RqNQ3L7eFBDEINnJF2RaDB2WVPiUHcO5cLGy/4=; b=W+TkU7csrZZnfBkOtFhylePDGFssX9veIkYfjGUDsHoI/LiMox7W8USxCUBY4Pwov6 JZyxfZBx0jbY0MMYb1L6LycGZZ2n0Wh8w3l42xMC9fW5gVthVacYO9HMK0uUGAAWrkbr JaznfNo6HNiyIAwWsAHZeAqk9U4H4+gZPIY9cauc42nR0ASvc0LWxO86WLLjSZ8s88tG GiTGhMjETNW99TPijr/1v0I+1ursqOOPtSuG7TGxoP5yifnuOCkFJryxwv5+f2sCSfx2 9e6dFjLkvXsaFWd5cSWfdgKOlPw1vmBiGBWfr/VE41s5Pc47jQNCfhemvLfp3WrWTJPN b6IQ== 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 b5si5888826edw.587.2020.12.06.03.49.07; Sun, 06 Dec 2020 03:49:30 -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 S1728922AbgLFLrv (ORCPT + 99 others); Sun, 6 Dec 2020 06:47:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:39698 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728950AbgLFLm0 (ORCPT ); Sun, 6 Dec 2020 06:42:26 -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 5.4 25/39] cxgb3: fix error return code in t3_sge_alloc_qset() Date: Sun, 6 Dec 2020 12:17:29 +0100 Message-Id: <20201206111555.884463752@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201206111554.677764505@linuxfoundation.org> References: <20201206111554.677764505@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 @@ -3176,6 +3176,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)