Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1676857pxu; Sun, 6 Dec 2020 03:43:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJzng8wg6sh4mO9slriWx1cjnwk0z+avow2txMs3mbjxr5RgYzTmG7uZGv24VZOFsxgObWv8 X-Received: by 2002:a17:906:b0d8:: with SMTP id bk24mr14653594ejb.113.1607255011692; Sun, 06 Dec 2020 03:43:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607255011; cv=none; d=google.com; s=arc-20160816; b=a+leQgnadReizOMsuSacfgD1f7gMXPmArNvnpoWi0QAuwHPTmlUiqwpVV7wVSPktm+ 1tw8zwJkBLuBr4zJPt4VMbWVnoFzDAWFn8yu2F6UM4VIARisRYjvGSc3FaayvzN2Sup1 5Q7mAs7H7tXGx5cOl9klPQ8JDo552CGsPDPwikZ84YqrKw5nJy40hE16+k8qZiCF1R+C gHOGCyI8uO+90gDxOyurDL3wpXZmbDcToPgC1VdltI8qWZ9W+axbL1by2dW33+D5/gde /KSZgTZzBl+LAybeB6L3OEnvPpVAif/nUjkESGazRh4m1bM9xfFOMv8vbUq1ArL4qmRq 2fJQ== 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=mj+WJEsdL1jJrJpZpvXxdvOZXv+91Wl6LSSj9iLt8SbQ8pymYwLAQ1q7S/7dh3135Q BHUGTXbb2CgjvBHOUtsS/7/0ecZ3Rq9rFnrdJra41pT/ifC5YWNjM2wlylqnN/ViD6cZ fA27nwFEpOg+c9wPjyJIf2OXhEV3/kZzG/KRIn8/6jjWqZLSf+jHc8H7F9l6MwsUC/tt O01EVc/zvVaCW9yxucw94nGKu2LrCklfhX9CHMKMiCGKp5F/udd18g+Mm4ZuT5PXmOur ri6dx218pg6xy8pY6bGe/Nh03oV7aEvL1ii6/glW5V35M9jZ8HoKReUC2Z8HG5qp56mV HR7Q== 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 f12si4860142ejk.142.2020.12.06.03.43.09; Sun, 06 Dec 2020 03:43:31 -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 S1728535AbgLFLkS (ORCPT + 99 others); Sun, 6 Dec 2020 06:40:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:36844 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728522AbgLFLkR (ORCPT ); Sun, 6 Dec 2020 06:40:17 -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.19 21/32] cxgb3: fix error return code in t3_sge_alloc_qset() Date: Sun, 6 Dec 2020 12:17:21 +0100 Message-Id: <20201206111556.781293827@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201206111555.787862631@linuxfoundation.org> References: <20201206111555.787862631@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)