Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7497232imu; Tue, 22 Jan 2019 07:01:16 -0800 (PST) X-Google-Smtp-Source: ALg8bN4p1L44RO1E2tK3+AxqhPFNdoHFv0lvP30kLB/SQw1DgJ63MEKqlBHsWr5QG4AgzqP0aP01 X-Received: by 2002:a17:902:a586:: with SMTP id az6mr17748639plb.298.1548169276298; Tue, 22 Jan 2019 07:01:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548169276; cv=none; d=google.com; s=arc-20160816; b=KX3DGIqNF3GkH492trkoXKCJ0GDy+WxipPjT5u0suNhlNo//g1LYcELG+rAbKWzsy3 NJE1ze0zwL+i+3JUHiUtYqWSXO87yvUJMA6ZL9CLRZxPAEBhw+rv23RwMfIqa/RJl1Na vKjFm5UK8/TsZ2KDpy0QBcPVeSuZiLGxgDbHa2Y0tw7XCSt5zohNGOXerJgJJ0cSwowK /SF8GE2O93qlH2ESUIC2FCH9NupqYwOf/pdXD+QFeIgtNlgxs1o8rG4EgKEdsZj/ZrZC uztCv1zRHykhN5fItmlDhiB7OzWb68HfZsXegtzBzM+7+w81LpbGHG7WEYUy1zvmH/rF Y9fA== 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=s4vDiyy7jEeR7a2TKXOMnMC7yrdk1Xzqj98uc3ty2bM=; b=RD3memTeIcjW6ITR0zpoRPLMasGBel3VBGjTK499VdmSkok/5UVWkUuOHgvPcwOZSP Ok91vMS972PQ40cw9GLSZRn2hvn0+bnojodWhHBcBN00yBLYglPWHOPGC5Yh5kViUPIl woUzgwXLBoZy/CplbZJiIVufLjC7H+dsL5bKRyKGADAEYPs27QIVsEsftPxP31906gXy H2HJDmcWt5hdLuoi7iudxn9ijxJKHfqnDn0t9WMYdln4MT7JrL7D2hlog6lzCf5EV2Ie wrCRaO2FlPwssuIKP28Kx4ek5yvn4Q28hsK08Q5kj+kEbX65dSCrFNq8j5qf5PZGBA13 xluw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oQtYIrNA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 203si11567089pgb.440.2019.01.22.07.00.58; Tue, 22 Jan 2019 07:01:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oQtYIrNA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729091AbfAVO6e (ORCPT + 99 others); Tue, 22 Jan 2019 09:58:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:37858 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729015AbfAVO6b (ORCPT ); Tue, 22 Jan 2019 09:58:31 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 59112217D4; Tue, 22 Jan 2019 14:58:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548169110; bh=HVQq63F+Jt4yklUBPDZYzPWLiSc2sgrhuYQSlsHAx8M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oQtYIrNA+a0daVHs9FzmxAiTn2omS6jUhL5hYVOywe0GNBkBVAcmgXK5Kb5EilyS9 gXQFI9J09KnAqx0GmLt/dKicftUZwLbMoyBjjPfOeWOXnWRki8eqbeePyl+AUXp4Qw qVelNcVtXUMNJIKjWf3KR9CeiTQxuM6Dz2abLlko= From: Greg Kroah-Hartman To: Ralf Baechle , Paul Burton , James Hogan , John Crispin Cc: linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, Greg Kroah-Hartman , Andy Shevchenko Subject: [PATCH 3/5] mips: mm: no need to check return value of debugfs_create functions Date: Tue, 22 Jan 2019 15:57:40 +0100 Message-Id: <20190122145742.11292-4-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190122145742.11292-1-gregkh@linuxfoundation.org> References: <20190122145742.11292-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: Andy Shevchenko Cc: linux-mips@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- arch/mips/mm/sc-debugfs.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/arch/mips/mm/sc-debugfs.c b/arch/mips/mm/sc-debugfs.c index 2a116084216f..9507421de335 100644 --- a/arch/mips/mm/sc-debugfs.c +++ b/arch/mips/mm/sc-debugfs.c @@ -55,20 +55,11 @@ static const struct file_operations sc_prefetch_fops = { static int __init sc_debugfs_init(void) { - struct dentry *dir, *file; - - if (!mips_debugfs_dir) - return -ENODEV; + struct dentry *dir; dir = debugfs_create_dir("l2cache", mips_debugfs_dir); - if (IS_ERR(dir)) - return PTR_ERR(dir); - - file = debugfs_create_file("prefetch", S_IRUGO | S_IWUSR, dir, - NULL, &sc_prefetch_fops); - if (!file) - return -ENOMEM; - + debugfs_create_file("prefetch", S_IRUGO | S_IWUSR, dir, NULL, + &sc_prefetch_fops); return 0; } late_initcall(sc_debugfs_init); -- 2.20.1