Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7478651imu; Tue, 22 Jan 2019 06:43:35 -0800 (PST) X-Google-Smtp-Source: ALg8bN4Tp15+ajQk4SnFQ1IhabVHYhu/Zq5fm65eqxsxD/KEQdTH8qe3+/KJ2160sxEVJFHF1QBB X-Received: by 2002:a63:2ac9:: with SMTP id q192mr32279123pgq.58.1548168215152; Tue, 22 Jan 2019 06:43:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548168215; cv=none; d=google.com; s=arc-20160816; b=IWwGb0ofhFAJ3O6aDeBwF9Z4KbejgnHzvuzEsnLAj7jtkHx9eaqerInS66wxiN3/Ho vk+hdLwK/qPcKRd/MDR9vIl9EJacSY4i8rZTlwldauBX6Q8637BpeQwJyo9t2mbK+mHk z2pY6kmFu/UI73pH/FmFoA2DwlOHmCucKwvxixzzewppVjkohOV0njV+QgbrNkUbRxdP Y0NK+LLu5Jj5BPK3mQyoLutcjmuH6MLn3avQjBiaLqSvRrbHzPZB6RY13sQFZIa/lhSS 3ziCSqMSxlqrWBJ7LDIkbT8ztsXPUtYlFZpiQJ0+boySQRKc2Be53b3OlNnxR9MSfweu 27OQ== 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=6wICl5hRvB6ANRSwm+abSVSSXlRBvyn8BlU1XWDIWyw=; b=TBZuUR7wkO7aosYQQeYHpzUU4+e/gBU0sGG+cxYxKh5QkfFOpNOlYBHG2QCUN0zX5e QI8bo5jNe4J/NtijzVfj3lKTwc1gCbuw6j7/ngoKZUqL3YtLvW7VP9jNFcZZmhpKQIr1 Si688LEF5KxuBp1zhfe+oRSesDKC+uFv7ZCQOLnQ51PJmfYjANOECOOHuQKP6h80mHPo uRgHlxZt0upZ+ghTOnWU00Yi2OhScGcVs3obw6ZbMgJIHdjjvmvDXtYMa3v8bEzmaTr1 dpSyoZBtKGA2kKCO0KzbIyq5opSRQwpETiCEtQcgBO1PesH0XE2cD/0S9QI4xHvwvZwv Tjzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Oc9LH+bw; 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 r2si16160940pgk.389.2019.01.22.06.43.19; Tue, 22 Jan 2019 06:43:35 -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=Oc9LH+bw; 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 S1728950AbfAVOll (ORCPT + 99 others); Tue, 22 Jan 2019 09:41:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:53520 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728899AbfAVOlg (ORCPT ); Tue, 22 Jan 2019 09:41:36 -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 45B4F217D6; Tue, 22 Jan 2019 14:41:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548168095; bh=JBjLL9TSk/DcRzx3WlQjotQ/M37jVyqq/YrBoWKS0Hw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Oc9LH+bwETYqPMMPYduzLxssl/TIEgtp1+BPNOdaigJ/2Qk+2eUcIg8Im/wWtq0e2 r3xFsDBRre/lXreJUM/3KLk9Za1Xd03RyhtglET+bVURiYw668ijKBA3s+WofCQwRg qLnFk7n22/489T8Tw4C6D0bz0arDhf5qdO9eJAkY= From: Greg Kroah-Hartman To: Catalin Marinas , Kevin Hilman , Russell King , Will Deacon Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Greg Kroah-Hartman , Tony Lindgren , linux-omap@vger.kernel.org Subject: [PATCH 4/4] arm: omap2: no need to check return value of debugfs_create functions Date: Tue, 22 Jan 2019 15:41:14 +0100 Message-Id: <20190122144114.9816-5-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190122144114.9816-1-gregkh@linuxfoundation.org> References: <20190122144114.9816-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: Kevin Hilman Cc: Tony Lindgren Cc: Russell King Cc: linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Greg Kroah-Hartman --- arch/arm/mach-omap2/pm-debug.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c index 5a8839203958..1f9334a3d611 100644 --- a/arch/arm/mach-omap2/pm-debug.c +++ b/arch/arm/mach-omap2/pm-debug.c @@ -193,9 +193,8 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *dir) return 0; d = debugfs_create_dir(pwrdm->name, (struct dentry *)dir); - if (d) - (void) debugfs_create_file("suspend", S_IRUGO|S_IWUSR, d, - (void *)pwrdm, &pwrdm_suspend_fops); + debugfs_create_file("suspend", S_IRUGO|S_IWUSR, d, pwrdm, + &pwrdm_suspend_fops); return 0; } @@ -233,16 +232,14 @@ static int __init pm_dbg_init(void) return 0; d = debugfs_create_dir("pm_debug", NULL); - if (!d) - return -EINVAL; - (void) debugfs_create_file("count", 0444, d, NULL, &pm_dbg_counters_fops); - (void) debugfs_create_file("time", 0444, d, NULL, &pm_dbg_timers_fops); + debugfs_create_file("count", 0444, d, NULL, &pm_dbg_counters_fops); + debugfs_create_file("time", 0444, d, NULL, &pm_dbg_timers_fops); pwrdm_for_each(pwrdms_setup, (void *)d); - (void) debugfs_create_file("enable_off_mode", S_IRUGO | S_IWUSR, d, - &enable_off_mode, &pm_dbg_option_fops); + debugfs_create_file("enable_off_mode", S_IRUGO | S_IWUSR, d, + &enable_off_mode, &pm_dbg_option_fops); pm_dbg_init_done = 1; return 0; -- 2.20.1