Thread (14 messages) 14 messages, 2 authors, 2024-09-11
STALE641d
Revisions (4)
  1. v1 [diff vs current]
  2. v2 current
  3. v2 [diff vs current]
  4. v2 [diff vs current]

[PATCH -next v2 2/2] media: siano: remove redundant null pointer checks in cec_devnode_init()

From: Li Zetao <hidden>
Date: 2024-09-07 03:01:29
Also in: linux-arm-kernel, linux-media, linux-rockchip, linux-sunxi, platform-driver-x86
Subsystem: media input infrastructure (v4l/dvb), siano dvb driver, the rest · Maintainers: Mauro Carvalho Chehab, Linus Torvalds

Since the debugfs_create_dir() never returns a null pointer, checking
the return value for a null pointer is redundant, Remove this check
since debugfs_create_file can handle IS_ERR pointers.

Signed-off-by: Li Zetao <redacted>
---
v1 -> v2: Remove this check since debugfs_create_file can
handle IS_ERR pointers.
v1:
https://lore.kernel.org/all/20240903143607.2004802-2-lizetao1@huawei.com/ (local)

 drivers/media/common/siano/smsdvb-debugfs.c | 4 ----
 1 file changed, 4 deletions(-)
diff --git a/drivers/media/common/siano/smsdvb-debugfs.c b/drivers/media/common/siano/smsdvb-debugfs.c
index 73990e469df9..9db38ae4ecee 100644
--- a/drivers/media/common/siano/smsdvb-debugfs.c
+++ b/drivers/media/common/siano/smsdvb-debugfs.c
@@ -411,10 +411,6 @@ void smsdvb_debugfs_register(void)
 	 * subsystem.
 	 */
 	d = debugfs_create_dir("smsdvb", usb_debug_root);
-	if (IS_ERR_OR_NULL(d)) {
-		pr_err("Couldn't create sysfs node for smsdvb\n");
-		return;
-	}
 	smsdvb_debugfs_usb_root = d;
 }
 
-- 
2.34.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help