Skip to content

Commit 2c21fd5

Browse files
Li ZetaoHans Verkuil
Li Zetao
authored and
Hans Verkuil
committed
media: siano: remove redundant null pointer checks in cec_devnode_init()
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 <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
1 parent 672f24e commit 2c21fd5

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

drivers/media/common/siano/smsdvb-debugfs.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,6 @@ void smsdvb_debugfs_release(struct smsdvb_client_t *client)
398398

399399
void smsdvb_debugfs_register(void)
400400
{
401-
struct dentry *d;
402-
403401
/*
404402
* FIXME: This was written to debug Siano USB devices. So, it creates
405403
* the debugfs node under <debugfs>/usb.
@@ -410,12 +408,7 @@ void smsdvb_debugfs_register(void)
410408
* node for sdio-based boards, but this may need some logic at sdio
411409
* subsystem.
412410
*/
413-
d = debugfs_create_dir("smsdvb", usb_debug_root);
414-
if (IS_ERR_OR_NULL(d)) {
415-
pr_err("Couldn't create sysfs node for smsdvb\n");
416-
return;
417-
}
418-
smsdvb_debugfs_usb_root = d;
411+
smsdvb_debugfs_usb_root = debugfs_create_dir("smsdvb", usb_debug_root);
419412
}
420413

421414
void smsdvb_debugfs_unregister(void)

0 commit comments

Comments
 (0)