Return-Path: Received: from mail-bl2nam02on0094.outbound.protection.outlook.com ([104.47.38.94]:45952 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727798AbeH3WPR (ORCPT ); Thu, 30 Aug 2018 18:15:17 -0400 From: Sasha Levin To: "stable@vger.kernel.org" CC: Wei Yongjun , Anna Schumaker , Sasha Levin Subject: [PATCH AUTOSEL 4.14 44/67] NFSv4: Fix error handling in nfs4_sp4_select_mode() Date: Thu, 30 Aug 2018 18:11:19 +0000 Message-ID: <20180830180918.36327-44-alexander.levin@microsoft.com> References: <20180830180918.36327-1-alexander.levin@microsoft.com> In-Reply-To: <20180830180918.36327-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Wei Yongjun [ Upstream commit 72bf75cfc00c02aa66ef6133048f37aa5d88825c ] Error code is set in the error handling cases but never used. Fix it. Fixes: 937e3133cd0b ("NFSv4.1: Ensure we clear the SP4_MACH_CRED flags in n= fs4_sp4_select_mode()") Signed-off-by: Wei Yongjun Signed-off-by: Anna Schumaker Signed-off-by: Sasha Levin --- fs/nfs/nfs4proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 51deff8e1f86..80d92fd614e2 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -7490,7 +7490,7 @@ static int nfs4_sp4_select_mode(struct nfs_client *cl= p, } out: clp->cl_sp4_flags =3D flags; - return 0; + return ret; } =20 struct nfs41_exchange_id_data { --=20 2.17.1