diff mbox series

host1x: debugfs_create_dir() can never return NULL

Message ID 20190613114522.GB13119@kroah.com (mailing list archive)
State New, archived
Headers show
Series host1x: debugfs_create_dir() can never return NULL | expand

Commit Message

Greg KH June 13, 2019, 11:45 a.m. UTC
So there is no need to check for a value that can never happen.  No need
to check the return value all anyway, as any debugfs call can take the
result of this function as an option just fine.

Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-tegra@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/gpu/host1x/debug.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Thierry Reding June 13, 2019, 4:35 p.m. UTC | #1
On Thu, Jun 13, 2019 at 01:45:22PM +0200, Greg Kroah-Hartman wrote:
> So there is no need to check for a value that can never happen.  No need
> to check the return value all anyway, as any debugfs call can take the
> result of this function as an option just fine.
> 
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-tegra@vger.kernel.org
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
>  drivers/gpu/host1x/debug.c | 3 ---
>  1 file changed, 3 deletions(-)

Applied, thanks.

Thierry
diff mbox series

Patch

diff --git a/drivers/gpu/host1x/debug.c b/drivers/gpu/host1x/debug.c
index 329e4a3d8ae7..6c5ee3e39dc6 100644
--- a/drivers/gpu/host1x/debug.c
+++ b/drivers/gpu/host1x/debug.c
@@ -171,9 +171,6 @@  static void host1x_debugfs_init(struct host1x *host1x)
 {
 	struct dentry *de = debugfs_create_dir("tegra-host1x", NULL);
 
-	if (!de)
-		return;
-
 	/* Store the created entry */
 	host1x->debugfs = de;