summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Zetao <lizetao1@huawei.com>2024-09-10 23:48:03 +0800
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2024-10-12 16:28:25 +0200
commit2c21fd53a1a0ab8cf0438a9d554ad47d1e9704b2 (patch)
tree2f03dc391a8a49399df7c16188e59c0d574048b0
parent672f24ed6ebcd986688c6674a6d994a265fefc25 (diff)
downloadlwn-2c21fd53a1a0ab8cf0438a9d554ad47d1e9704b2.tar.gz
lwn-2c21fd53a1a0ab8cf0438a9d554ad47d1e9704b2.zip
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 <lizetao1@huawei.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--drivers/media/common/siano/smsdvb-debugfs.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/media/common/siano/smsdvb-debugfs.c b/drivers/media/common/siano/smsdvb-debugfs.c
index 73990e469df9..d14ba271db50 100644
--- a/drivers/media/common/siano/smsdvb-debugfs.c
+++ b/drivers/media/common/siano/smsdvb-debugfs.c
@@ -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.
@@ -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)