Skip to contentSkip to conversation

host1x: debugfs_create_dir() can never return NULL

PATCH Applied Greg Kroah-Hartman 2 participants 2 messages Jun 13, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 host1x: debugfs_create_dir() can never return NULL

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.

---
 drivers/gpu/host1x/debug.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/host1x/debug.c +0 -3
index 329e4a3d8ae7..6c5ee3e39dc6 100644
@@ -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;
 
Signature · 6 lines
2.22.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 11 lines · Greg Kroah-Hartman

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.

---
 drivers/gpu/host1x/debug.c | 3 ---
 1 file changed, 3 deletions(-)

Applied, thanks.

Thierry

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel