From patchwork Sat Aug 10 10:55:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 11088519 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1EF9514D5 for ; Sat, 10 Aug 2019 10:56:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A06E201F3 for ; Sat, 10 Aug 2019 10:56:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED55420564; Sat, 10 Aug 2019 10:56:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 633B8201F3 for ; Sat, 10 Aug 2019 10:56:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726048AbfHJK4A (ORCPT ); Sat, 10 Aug 2019 06:56:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:36382 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726024AbfHJK4A (ORCPT ); Sat, 10 Aug 2019 06:56:00 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 57105217F4; Sat, 10 Aug 2019 10:55:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565434559; bh=JTXpcPbxi8zq8+ur3MVA6u1sYK6zAN0B4FMWwInN5sU=; h=Date:From:To:Cc:Subject:From; b=NnufLDHRZsLq0VHVVYhLscg/Bg5K854ecROM3x1jE5+vtfKwoXbdT6TTpsv72FqHC Df3TwO2+XSOBxu3pBVGL8kIEF7CxAy6xgYwW5BBqMXyQbYZlDO8NUHu74Mzr+2pD3a 7uGu8/lBh4tSLw7mn+pZ50VVt8k29A8vf6InonSo= Date: Sat, 10 Aug 2019 12:55:57 +0200 From: Greg Kroah-Hartman To: Dmitry Torokhov , Andy Shevchenko , Marco Felsch Cc: Rob Herring , linux-input@vger.kernel.org Subject: [PATCH] input: edt-ft5x06: no need to check return value of debugfs_create functions Message-ID: <20190810105557.GA27295@kroah.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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: Dmitry Torokhov Cc: Andy Shevchenko Cc: Marco Felsch Cc: Rob Herring Cc: linux-input@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/input/touchscreen/edt-ft5x06.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index 3cc4341bbdff..5525f1fb1526 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -764,8 +764,6 @@ edt_ft5x06_ts_prepare_debugfs(struct edt_ft5x06_ts_data *tsdata, const char *debugfs_name) { tsdata->debug_dir = debugfs_create_dir(debugfs_name, NULL); - if (!tsdata->debug_dir) - return; debugfs_create_u16("num_x", S_IRUSR, tsdata->debug_dir, &tsdata->num_x); debugfs_create_u16("num_y", S_IRUSR, tsdata->debug_dir, &tsdata->num_y);