Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7527740imu; Tue, 22 Jan 2019 07:26:16 -0800 (PST) X-Google-Smtp-Source: ALg8bN5c69LqF8ROr0B6mWNx+iwuljBjyB+0lyaVMTh7e52R1DCoY8+f0BYsqjaD1muNR7USe6Fk X-Received: by 2002:a63:484c:: with SMTP id x12mr32196694pgk.375.1548170776377; Tue, 22 Jan 2019 07:26:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548170776; cv=none; d=google.com; s=arc-20160816; b=WJ3lyJVmU5/vfUL6uL68rwTdIFuqWNz3Fd+Db3qqJyWRMTnfQfVh1B8gFJ813422UI sLDXz2HsUxnnTuciSCf5JsmHX3068u15DXg5uL0CgvcNyNJA+EUYWmkES5SXtGrjdkZ0 hi6RzVMDDvJn5x8QHdMaShFVRyPx3KU4KoZfYS5htvSJICK4YUjYMmGTTgF8DXT1Sv5Y dmmcFj27kgAiLhtPFPkIDY35UxmZrIk+U7iLNNe/MbQs7Zf8hTc5v5xhU4hMlSW9wvOV WV83NCW1DaAozPl/TILVCwFHZfbvcvqle5k+wfolxd/c7mz6LFtJTLtXtJhZdlGT2YvE OG8g== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=D1YY1ocM4MiZ/7onJ6ZMCQvL0K6aG+wJbtJXDXyv5FM=; b=qRlTYvyUzTOzs0/Qk6r7Nij1lZVeQyr1XlXrkrhKDwDw4iCZZsVvR/znp8ecuimomG bX901aIEjOwFWFKQKQco2qsQcTh/g2HR8JhUb3YA0UR7fc5oIV4WiN0Rb3jmb/eghLgB peOYUyg1stK0qC1pfztQjn9CvGAbQpwk8TelDFkR/JY+Gjjtjh9+IEHy1nkotHGsfzdb z3n+Qi/ujvPkwLBfJNMZDG+CXenwbJmzqHu+L5Tyyldwz9aPOnxiPJ1OrPTF1wGWtuKH X8G2xWO/xKKev6/uOAeculZBvSaaYDa1y+DYLzD2qYPxAeOybbZ/6s4x59c+3WppEvGo UYxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tjV4SpXb; 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 q32si16116577pgm.410.2019.01.22.07.26.01; Tue, 22 Jan 2019 07:26: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=tjV4SpXb; 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 S1730058AbfAVPYL (ORCPT + 99 others); Tue, 22 Jan 2019 10:24:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:37792 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729981AbfAVPYJ (ORCPT ); Tue, 22 Jan 2019 10:24:09 -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 04536217D4; Tue, 22 Jan 2019 15:24:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548170648; bh=VVGely5ydeVrDBODAHMoYQnlw4BUra8XL8cikzWU7Dg=; h=From:To:Cc:Subject:Date:From; b=tjV4SpXbcorZt/URjF9QSvR7G2a5vDFP8LrntS9Km3DqSDBIpiCmev5NB2LrPawA2 I1LZlGkJk0ftu3wW2mAJtp/Gf8uM5kONfbFnjQnBFH5fDkCHYyKmC6E+a/xGyAQeSu P8QxzBGV6Wd9fcdV/lB9/m5W11orqIACOIsOyQB0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , Igor Mitsyanko , Avinash Patil , Sergey Matyukevich , Kalle Valo , linux-wireless@vger.kernel.org Subject: [PATCH] quantenna: no need to check return value of debugfs_create functions Date: Tue, 22 Jan 2019 16:21:35 +0100 Message-Id: <20190122152151.16139-36-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 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: Igor Mitsyanko Cc: Avinash Patil Cc: Sergey Matyukevich Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/quantenna/qtnfmac/debug.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/debug.c b/drivers/net/wireless/quantenna/qtnfmac/debug.c index 9f826b9ef5d9..10156780ea37 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/debug.c +++ b/drivers/net/wireless/quantenna/qtnfmac/debug.c @@ -16,17 +16,9 @@ #include "debug.h" -#undef pr_fmt -#define pr_fmt(fmt) "qtnfmac dbg: %s: " fmt, __func__ - void qtnf_debugfs_init(struct qtnf_bus *bus, const char *name) { bus->dbg_dir = debugfs_create_dir(name, NULL); - - if (IS_ERR_OR_NULL(bus->dbg_dir)) { - pr_warn("failed to create debugfs root dir\n"); - bus->dbg_dir = NULL; - } } void qtnf_debugfs_remove(struct qtnf_bus *bus) @@ -38,9 +30,5 @@ void qtnf_debugfs_remove(struct qtnf_bus *bus) void qtnf_debugfs_add_entry(struct qtnf_bus *bus, const char *name, int (*fn)(struct seq_file *seq, void *data)) { - struct dentry *entry; - - entry = debugfs_create_devm_seqfile(bus->dev, name, bus->dbg_dir, fn); - if (IS_ERR_OR_NULL(entry)) - pr_warn("failed to add entry (%s)\n", name); + debugfs_create_devm_seqfile(bus->dev, name, bus->dbg_dir, fn); } -- 2.20.1