Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3919764pxj; Mon, 21 Jun 2021 09:22:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeXraiPWM5tCFSCvVuwD5q9i5hKJ+cQJnU6TBNsb3fhXcBA1T0yJtR5rhXtsU1i7lm4O0R X-Received: by 2002:a17:906:b2cb:: with SMTP id cf11mr25739221ejb.448.1624292566357; Mon, 21 Jun 2021 09:22:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624292566; cv=none; d=google.com; s=arc-20160816; b=y8ZmJRdD/od0fEpkFZIEAkZ3nCJSBLT1kFeur4QNZgwCK/VjDaEolS5l/axKWhJU0k Kg+2EtZ0HrnVGD0dYnqkNZOLXifd/bfbxWXGCDAPhsISG7D8p/43CTC6/R440VP8VMcd vNKERaU6v5hb+IeCXtVWyvBz+rFsvdlrTycVq/JMo+APjqxWqPn5jKqZs6D4OYisTEB5 1bhdfw0f/8AuHGl+dH73LeyNroSPmsBX/61eX1RAjW7QdIxfgL6CjI3Az9HPLIrM2Jce k5d+gdua0rjwkinRFHcb0aza2PJ7p8qIwvPSEu49HoSw5f2LL6sprF4V61VU1ukXbYlJ thNw== 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=9bFDwrRMZpEA+pUXJW+4hs0NDJBhS58jzZoXK97aN4w=; b=x6ZYjME9A7dLQnEhEXYFf+lzmSMpp62RK47U/5+gwt4MJrsLNO2VTuC7bb6cZjArud LCDe42UxES3NLRjK9MIKCg/UPslY8pGCIf+aYgRCyqdgMTL5HhMacgGP5fDPmxFjgxpD 0VB/6K1WwiE8K3mU4Oy3NZ96JJWOLDp86HcWnAF79zkUuGfI8Sq/4F2Z0FpVW31ce0TW hrhxkuCI6Mwjgzh5/ZF61B5FFGUR77pc0YATTdohiPwwdAH/ECjC0RMc8CVgBOlhzdEg ODKX3bQmZla3NKoC0P6T0V8Sccd1EOP0AHKqTgqHUdEYJDRzo70tu+FGqPxgS6w7FzvO 7hdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jC6Dslo2; 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 hs7si8603626ejc.659.2021.06.21.09.22.23; Mon, 21 Jun 2021 09:22:46 -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=jC6Dslo2; 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 S231499AbhFUQVD (ORCPT + 99 others); Mon, 21 Jun 2021 12:21:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:40944 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231480AbhFUQUY (ORCPT ); Mon, 21 Jun 2021 12:20:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 333C4611C1; Mon, 21 Jun 2021 16:18:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292288; bh=0Pr4EMvCDhhDrPx+4salUCwP+/VcUirSWEqmwDNUiKc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jC6Dslo2O+N+XmzsjLutQGA7rQa9ktABJpMEiu/iICT6OH8UILdoCZjfl5JAPLx7n 5vF5cM9zrpoAYaOjfPYDabZbk8eSrrn4Ye+bBoesyNrHEt2pi8hYCajMMv2BuvTvXV rC+5zNJ4y13x/D7/AobMPWFukBGTAZJ1vnAkBLso= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , David Howells , linux-afs@lists.infradead.org, Linus Torvalds , Sasha Levin Subject: [PATCH 5.4 04/90] afs: Fix an IS_ERR() vs NULL check Date: Mon, 21 Jun 2021 18:14:39 +0200 Message-Id: <20210621154904.308509879@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154904.159672728@linuxfoundation.org> References: <20210621154904.159672728@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: Dan Carpenter [ Upstream commit a33d62662d275cee22888fa7760fe09d5b9cd1f9 ] The proc_symlink() function returns NULL on error, it doesn't return error pointers. Fixes: 5b86d4ff5dce ("afs: Implement network namespacing") Signed-off-by: Dan Carpenter Signed-off-by: David Howells cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/YLjMRKX40pTrJvgf@mwanda/ Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- fs/afs/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/afs/main.c b/fs/afs/main.c index 5cd26af2464c..d129a1a49616 100644 --- a/fs/afs/main.c +++ b/fs/afs/main.c @@ -196,8 +196,8 @@ static int __init afs_init(void) goto error_fs; afs_proc_symlink = proc_symlink("fs/afs", NULL, "../self/net/afs"); - if (IS_ERR(afs_proc_symlink)) { - ret = PTR_ERR(afs_proc_symlink); + if (!afs_proc_symlink) { + ret = -ENOMEM; goto error_proc; } -- 2.30.2