Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5019015imu; Tue, 29 Jan 2019 11:20:37 -0800 (PST) X-Google-Smtp-Source: ALg8bN76VGT3bMD8amGdAdGiKp+tLBdnrE9JlElT/FUrIfUbil22kO3WuIWJgG0dTHGsnEDw6H64 X-Received: by 2002:a62:5dd1:: with SMTP id n78mr27022183pfj.58.1548789637483; Tue, 29 Jan 2019 11:20:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548789637; cv=none; d=google.com; s=arc-20160816; b=PBIpw8KzP17AhKa92iv/55yIA69mkPhazYMhTUU9XXa4es/8k/Y4oSfp+UZa78KKfC BwY9dcVSttpJB0agxUO2umpHqEi2tEpBBq7RgVr+wWnER0+2H8dPDkQHG9SXKuix+tjO 2hzsdRYQcTWVFgccBhDkkiueMqx43TV/k7ZGaoeS3iCxb69q3vOSpEL0ZBAX5yvJg/5D QNRm3fREIPTLsbp8T/ODKdaOPRHxq8XUlsGJt1iy6nczVeoGJ6lOda55dxSJCZvTt3ix XSKofIAhCXeG8vkRf+yLSKLGq5k6Qmgil9mMGGVXhUwqCmuECyBETtbea1RvALYnMppf VQ4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=f2PU6XRS67iO5wog9TH30RDIzrgYcOjOgN9tTiwhXfo=; b=uR8Hfm0uoiVNz3XrKNUNypuzVQ7RXp8Sg9UF/WenoSE9z0obLCKnEV7oxRu49pGJwv MdMfmB0lUDOJs2ifgYnJv9A3kh9sLLq8zPFoBlIU//VkzbyEbblMU+NzncWSvqreJuhL bSJBmCuCvLlMtM/kz5bTxP/4BsVq2yPv8POaXJIW5KlfurGFmnFqLNEXzH6vjqyARMwW t3Kr9V+nateAw7O46lJLyGIdqNEvCrxYLzAYFaOnsSSIkIqVY3YLOR0FYcoxmghSbzwU gNOXPQsKl4I6zBjk2zhDCIp9n6yOJjA8+wZ39kkc+2g92u1tPNA3Nopt8whi7Hg2nRgS lNIA== ARC-Authentication-Results: i=1; mx.google.com; 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 u131si36761865pgc.287.2019.01.29.11.20.20; Tue, 29 Jan 2019 11:20:37 -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; 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 S1727607AbfA2TTr (ORCPT + 99 others); Tue, 29 Jan 2019 14:19:47 -0500 Received: from terminus.zytor.com ([198.137.202.136]:55507 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727056AbfA2TTr (ORCPT ); Tue, 29 Jan 2019 14:19:47 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x0TJJX2J2063447 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 29 Jan 2019 11:19:33 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x0TJJXOj2063443; Tue, 29 Jan 2019 11:19:33 -0800 Date: Tue, 29 Jan 2019 11:19:33 -0800 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Greg Kroah-Hartman Message-ID: Cc: peterz@infradead.org, tglx@linutronix.de, dvhart@infradead.org, mingo@kernel.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, hpa@zytor.com Reply-To: mingo@kernel.org, dvhart@infradead.org, hpa@zytor.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, peterz@infradead.org In-Reply-To: <20190122152151.16139-40-gregkh@linuxfoundation.org> References: <20190122152151.16139-40-gregkh@linuxfoundation.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:locking/core] futex: No need to check return value of debugfs_create functions Git-Commit-ID: 0365aeba50841e087b3d6a0eca1bddccc5e650c8 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-0.7 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_48_96 autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 0365aeba50841e087b3d6a0eca1bddccc5e650c8 Gitweb: https://git.kernel.org/tip/0365aeba50841e087b3d6a0eca1bddccc5e650c8 Author: Greg Kroah-Hartman AuthorDate: Tue, 22 Jan 2019 16:21:39 +0100 Committer: Thomas Gleixner CommitDate: Tue, 29 Jan 2019 20:15:48 +0100 futex: No need to check return value of debugfs_create functions 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. Signed-off-by: Greg Kroah-Hartman Signed-off-by: Thomas Gleixner Reviewed-by: Darren Hart (VMware) Cc: Peter Zijlstra Link: https://lkml.kernel.org/r/20190122152151.16139-40-gregkh@linuxfoundation.org --- kernel/futex.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/kernel/futex.c b/kernel/futex.c index fdd312da0992..69e619baf709 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -321,12 +321,8 @@ static int __init fail_futex_debugfs(void) if (IS_ERR(dir)) return PTR_ERR(dir); - if (!debugfs_create_bool("ignore-private", mode, dir, - &fail_futex.ignore_private)) { - debugfs_remove_recursive(dir); - return -ENOMEM; - } - + debugfs_create_bool("ignore-private", mode, dir, + &fail_futex.ignore_private); return 0; }