From patchwork Tue Jan 14 08:10:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 11331517 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C826E139A for ; Tue, 14 Jan 2020 08:15:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9B6E42084D for ; Tue, 14 Jan 2020 08:15:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="oAU8kvkz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726044AbgANIPe (ORCPT ); Tue, 14 Jan 2020 03:15:34 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:42160 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725820AbgANIPe (ORCPT ); Tue, 14 Jan 2020 03:15:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Y8XkrOzhJqTi+f6I6Nm6zwdHrPGq0bBMm1ziatkEG+s=; b=oAU8kvkzMCF3vhrIQGKM/difA5 TobY6b4ssZl9XZ6gYTyhfY7baHMxkoxiUAhlTfXTUP27tgfbGHY9HsUQ7EbbUUGaoy96pj2kKK492 sx02pmDt2QRLsg/0c2gut4wN/8etKFUHRC1irnGchMlQc83cqJz8K+rqW/SMf+b+R1Kl2ZMLeIykP muOFgtRC56H0yQRUzyvp22kPoLUrigjVUNHJVnTHPZbRB/TPvswbrfmc0PGj1WvOZw89YVRno867N /WiV6UM4NL/XG1x1AjGEmukF+rJ40mG4lNEEkrq/6S+9Ytvcl2cT8vZlYdfVjPrbWfWmL70vSzQ+n ebZ+2Esw==; Received: from [2001:4bb8:18c:4f54:fcbb:a92b:61e1:719] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1irHML-0006xw-CY; Tue, 14 Jan 2020 08:15:33 +0000 From: Christoph Hellwig To: linux-xfs@vger.kernel.org Cc: Allison Collins Subject: [PATCH 06/29] xfs: remove the name == NULL check from xfs_attr_args_init Date: Tue, 14 Jan 2020 09:10:28 +0100 Message-Id: <20200114081051.297488-7-hch@lst.de> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200114081051.297488-1-hch@lst.de> References: <20200114081051.297488-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org All callers provide a valid name pointer, remove the redundant check. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong --- fs/xfs/libxfs/xfs_attr.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c index 04431ab9f5f5..d5064213577c 100644 --- a/fs/xfs/libxfs/xfs_attr.c +++ b/fs/xfs/libxfs/xfs_attr.c @@ -65,10 +65,6 @@ xfs_attr_args_init( size_t namelen, int flags) { - - if (!name) - return -EINVAL; - memset(args, 0, sizeof(*args)); args->geo = dp->i_mount->m_attr_geo; args->whichfork = XFS_ATTR_FORK;