diff options
author | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-08-08 16:54:49 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-08-08 17:57:14 +0300 |
commit | 8179de98cd35242446f4c7a6ecdd73c6c41f0cfb (patch) | |
tree | c7c5236de69b8e2c5eae314c7d81dd7b844182a1 /drivers/media | |
parent | 6c33d826b5c468033c21d8653d148dd758bbab28 (diff) | |
download | linux-8179de98cd35242446f4c7a6ecdd73c6c41f0cfb.tar.xz |
siano: get rid of an unused return code for debugfs register
The siano's debugfs register logic is optional: it should be ok
if it fails. So, no need to check if debufs register succeeded.
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/common/siano/smsdvb-debugfs.c | 10 | ||||
-rw-r--r-- | drivers/media/common/siano/smsdvb.h | 7 |
2 files changed, 7 insertions, 10 deletions
diff --git a/drivers/media/common/siano/smsdvb-debugfs.c b/drivers/media/common/siano/smsdvb-debugfs.c index 40891f4f842b..c95d4583498e 100644 --- a/drivers/media/common/siano/smsdvb-debugfs.c +++ b/drivers/media/common/siano/smsdvb-debugfs.c @@ -500,7 +500,7 @@ void smsdvb_debugfs_release(struct smsdvb_client_t *client) client->debugfs = NULL; } -int smsdvb_debugfs_register(void) +void smsdvb_debugfs_register(void) { struct dentry *d; @@ -517,15 +517,15 @@ int smsdvb_debugfs_register(void) 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 PTR_ERR(d); - } else { - smsdvb_debugfs_usb_root = d; + return; } - return 0; + smsdvb_debugfs_usb_root = d; } void smsdvb_debugfs_unregister(void) { + if (!smsdvb_debugfs_usb_root) + return; debugfs_remove_recursive(smsdvb_debugfs_usb_root); smsdvb_debugfs_usb_root = NULL; } diff --git a/drivers/media/common/siano/smsdvb.h b/drivers/media/common/siano/smsdvb.h index b15754d95ec0..befeb9817e54 100644 --- a/drivers/media/common/siano/smsdvb.h +++ b/drivers/media/common/siano/smsdvb.h @@ -107,7 +107,7 @@ struct RECEPTION_STATISTICS_PER_SLICES_S { int smsdvb_debugfs_create(struct smsdvb_client_t *client); void smsdvb_debugfs_release(struct smsdvb_client_t *client); -int smsdvb_debugfs_register(void); +void smsdvb_debugfs_register(void); void smsdvb_debugfs_unregister(void); #else @@ -119,10 +119,7 @@ static inline int smsdvb_debugfs_create(struct smsdvb_client_t *client) static inline void smsdvb_debugfs_release(struct smsdvb_client_t *client) {} -static inline int smsdvb_debugfs_register(void) -{ - return 0; -}; +static inline void smsdvb_debugfs_register(void) {} static inline void smsdvb_debugfs_unregister(void) {}; |