Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp112019ybg; Mon, 8 Jun 2020 17:56:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzs7uWEdENYqs5FGQKeVQEPrAOLd5E2QVqBxYt1nc2fqatgPXXqmsmbwdhdzYWJxMQeGdA1 X-Received: by 2002:a17:906:1f4f:: with SMTP id d15mr22939560ejk.206.1591664218779; Mon, 08 Jun 2020 17:56:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591664218; cv=none; d=google.com; s=arc-20160816; b=dxpZcxxom0uoVb6p3QRSPkcqyWx/VuaBDdwM1LURyNf+tZR2cjbVwCLPxaeUXF4h/H rt3baXFOG00XbLWwCb7cLcwn9hxyGMcw7yh4zlXWsjAI0YtxTQOdA7XPFx1dQoAN5AVu dUBTnCKwCw+aVb+T/5fg+lFXw58PXrNHQ0nIHPKRh1fFuvkONzDyQXXweueaIaUKxkuM g02t80MRuCsZWk3lseXQ8x+yoSWrJoAxD/UavI7SgnP/DG16XnwI30JelJY6eVTama3P mtSVHD72bIPgdHL9Z5ndJ43RZwGtS1FWJY/96wSKYBa4yI5K3cGqcncihyIEDIUysvDJ zR4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lK+hAamOzAdLsZhH94ipi/uuo0SBex40JjtEzwKoypU=; b=eww0Og3OpPx4Upe11gnmW3bR6xuA93iwfbwco4DBbvIiBVFKFVavV6uJFBJZQwekCx IOgRiJRu4x08eK0sbkJQxuwl0WRf4p+eqaJ6k7E0m70SF34WCWOltVSmk2dpADEOSji9 G5Ro040BKQJQMLUBMh9XqgEqqfCffvUzJN4Zimal53Cy2qWedHA4FBRY1FRlCvqCdZ+e CnJiRHlONmrVijQUuTsjjMeqFndVrZd/vv0kO2p27wvF+v7qioZ34p2rHDe8wSGXLUQN UyjR6I6BKz4Exna2Jqovxtzu1R6E4aAlE29b8ysPWdQRW1eIxFCqt6+KHs56dWOi8bSt ahgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jb97ttQr; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k13si10468749edh.53.2020.06.08.17.56.35; Mon, 08 Jun 2020 17:56:58 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=jb97ttQr; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387893AbgFIAys (ORCPT + 99 others); Mon, 8 Jun 2020 20:54:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:55164 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728415AbgFHXJ1 (ORCPT ); Mon, 8 Jun 2020 19:09:27 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 483BC208B8; Mon, 8 Jun 2020 23:09:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591657767; bh=gIPMWsm4ABPCize5QULWOmfap6esL9krjFHVmOk7eLw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jb97ttQrecBOA4dUUzSc+83oiF7UcGx3ZHKsIsaqpptNpzD5XMGrZkf+pst+Xt6ro 6i5TvtUjwkNmVVh6wy1blMQ88xD1IosG+09xAise72ejAk/h7u9fsI62akxWQZJFft H9oMwVQS0mEKCPIADQ73yGdUyvZwGGFgyEh1SP4Q= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Wei Yongjun , "David S . Miller" , Sasha Levin , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.7 151/274] ice: Fix error return code in ice_add_prof() Date: Mon, 8 Jun 2020 19:04:04 -0400 Message-Id: <20200608230607.3361041-151-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200608230607.3361041-1-sashal@kernel.org> References: <20200608230607.3361041-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wei Yongjun [ Upstream commit f8d530ac29fe9248f5e58ca5bcf4c368f8393ccf ] Fix to return a error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 31ad4e4ee1e4 ("ice: Allocate flow profile") Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/ice/ice_flex_pipe.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ice/ice_flex_pipe.c b/drivers/net/ethernet/intel/ice/ice_flex_pipe.c index 42bac3ec5526..e7a2671222d2 100644 --- a/drivers/net/ethernet/intel/ice/ice_flex_pipe.c +++ b/drivers/net/ethernet/intel/ice/ice_flex_pipe.c @@ -2962,8 +2962,10 @@ ice_add_prof(struct ice_hw *hw, enum ice_block blk, u64 id, u8 ptypes[], /* add profile info */ prof = devm_kzalloc(ice_hw_to_dev(hw), sizeof(*prof), GFP_KERNEL); - if (!prof) + if (!prof) { + status = ICE_ERR_NO_MEMORY; goto err_ice_add_prof; + } prof->profile_cookie = id; prof->prof_id = prof_id; -- 2.25.1