Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3419765pxf; Mon, 29 Mar 2021 01:31:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmV+hH8y0vFh4MG4aqs9CsoI1hG8jMI+hJmfWs8IZcfOL7RTV9bxyjklSngliYepemh/SG X-Received: by 2002:a17:906:73cd:: with SMTP id n13mr26537429ejl.535.1617006668902; Mon, 29 Mar 2021 01:31:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617006668; cv=none; d=google.com; s=arc-20160816; b=EckC4Z9UQXFhhb1q6HLGJysXFMdL4ggpzXoJew0KIt3ysIZxla+7ga5VUbIHoDk5tn psjvSPpRns1QG5HQBNqIHN3ParJQWrms9DIzcYcE/TE5pC0nN+B3LYLafABH5OqL19s6 fMYKWEcob3dkVv/epGL1FZvc9h5UDYdPJ2u+YgY058+zNpmh4znBq9iNfSYvLjNWKflI bisRF+aBM0AObmx9hRegTmfPWEGacF6YDLTLj8Z34IAWju3Fj2eU7M6Wt0O51AfzvFmQ bHEl8zLOKZrbiS6C4R8Q+JnvOGNGX7ebC65cemS3Htdeea+AZWp1Hr4bpNRT5+02OJDk M3wA== 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:dkim-signature; bh=gh3u53QFeN8eUQ0l98ZsxRzCv3Ms/4u02w12a/ozYUk=; b=anQWVo4JFWBr94TXyoDup7GiabLMX5vTk8Y+/g+bMPt0sLFTXzwm2Xx5/DJiLeLo4t L6MKXT4D1nt46OeB+XGtcHLoFO5THAg9sApstatgL3LX5adh3xqvZRwfkevFVIVO1L/u zn6Cu5b8krM55GH1VFEmHqCoRHhHHY5In6VuCPMUVk9KzHrAuAo6mEp6cj1L8KBbveVO ACmDoViyYiNnfFGOyzjeqffn7hAD8ecwAJrj2F/r9JXs+lLEQlZWHXuschixjXI7jrFR ci0l4hkSFnOB1cqmnTkXDrT+s76rhZpfr7xp2ulD2hI8co186bkzxWs7qRUE470vKAbG F9IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cmZ4UeUY; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gh5si12627844ejb.479.2021.03.29.01.30.46; Mon, 29 Mar 2021 01:31:08 -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=@linuxfoundation.org header.s=korg header.b=cmZ4UeUY; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233820AbhC2I1Q (ORCPT + 99 others); Mon, 29 Mar 2021 04:27:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:58428 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233259AbhC2IRW (ORCPT ); Mon, 29 Mar 2021 04:17:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F39AE61990; Mon, 29 Mar 2021 08:16:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617005813; bh=VWVsVUMY3SUNNZG6xwnbldaWKxsDHqWx8i0e/+hCGnw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cmZ4UeUYnl2NMKGrLKDeGUuMOsOpwRdBYuqF6CLdXSc7IE3q9EWZeHYxj/sxaYOLM gN5BO1srcpf1TWdE9OXfGs4FcJYd6vKIAxFTWTMQSWpVZyjQRGoaCt2WZTctI3hurO 8QHih3IYzLyLwIrdnDKKnCMslTy+XtIggE4rg2PA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, TOTE Robot , Jia-Ju Bai , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 015/221] net: intel: iavf: fix error return code of iavf_init_get_resources() Date: Mon, 29 Mar 2021 09:55:46 +0200 Message-Id: <20210329075629.689455351@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210329075629.172032742@linuxfoundation.org> References: <20210329075629.172032742@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: Jia-Ju Bai [ Upstream commit 6650d31f21b8a0043613ae0a4a2e42e49dc20b2d ] When iavf_process_config() fails, no error return code of iavf_init_get_resources() is assigned. To fix this bug, err is assigned with the return value of iavf_process_config(), and then err is checked. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/iavf/iavf_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c index 0a867d64d467..dc5b3c06d1e0 100644 --- a/drivers/net/ethernet/intel/iavf/iavf_main.c +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c @@ -1776,7 +1776,8 @@ static int iavf_init_get_resources(struct iavf_adapter *adapter) goto err_alloc; } - if (iavf_process_config(adapter)) + err = iavf_process_config(adapter); + if (err) goto err_alloc; adapter->current_op = VIRTCHNL_OP_UNKNOWN; -- 2.30.1