Skip to content

Commit

Permalink
media: siano: remove redundant null pointer checks in cec_devnode_init()
Browse files Browse the repository at this point in the history
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 <lizetao1@huawei.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
  • Loading branch information
Li Zetao authored and Hans Verkuil committed Oct 12, 2024
1 parent 672f24e commit 2c21fd5
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions drivers/media/common/siano/smsdvb-debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,6 @@ void smsdvb_debugfs_release(struct smsdvb_client_t *client)

void smsdvb_debugfs_register(void)
{
struct dentry *d;

/*
* FIXME: This was written to debug Siano USB devices. So, it creates
* the debugfs node under <debugfs>/usb.
Expand All @@ -410,12 +408,7 @@ void smsdvb_debugfs_register(void)
* node for sdio-based boards, but this may need some logic at sdio
* 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;
smsdvb_debugfs_usb_root = debugfs_create_dir("smsdvb", usb_debug_root);
}

void smsdvb_debugfs_unregister(void)
Expand Down

0 comments on commit 2c21fd5

Please sign in to comment.