media: NULL check is meaningless before debugfs_remove_recursive
Subsystems (2)
PATCH 1/1 media: NULL check is meaningless before debugfs_remove_recursive
debugfs_remove_recursive has taken null pointer into account. so remove the unneeded check.
--- drivers/media/usb/uvc/uvc_debugfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/media/usb/uvc/uvc_debugfs.c +1 -2
@@ -128,6 +128,5 @@ void uvc_debugfs_init(void)void uvc_debugfs_cleanup (void ) { -if (uvc_debugfs_root_dir !=NULL ) -debugfs_remove_recursive (uvc_debugfs_root_dir); +debugfs_remove_recursive (uvc_debugfs_root_dir); }
Signature · 1 line
1.7.12.4
Laurent Pinchart
maintainerHi Zhong,
Thank you for the patch.
Quoted 4 lines · On Friday, 17 August 2018 06:37:26 EEST zhong jiang wrote:
debugfs_remove_recursivehas taken null pointer into account. so remove the unneeded check.Signed-off-by zhong jiang <[email protected]>
I already have a similar patch in my tree (git://linuxtv.org/pinchartl/
media.git uvc/next) and will include it in my pull request for v4.20.
Quoted 16 lines
--- drivers/media/usb/uvc/uvc_debugfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)(quoted diff) +0
-0
b/drivers/media/usb/uvc/uvc_debugfs.cindex 368f8f8..6995aeb 100644drivers/media/usb/uvc/uvc_debugfs.c +1
-2@@ -128,6 +128,5 @@ void uvc_debugfs_init(void)void uvc_debugfs_cleanup (void ) { -if (uvc_debugfs_root_dir !=NULL ) -debugfs_remove_recursive (uvc_debugfs_root_dir); +debugfs_remove_recursive (uvc_debugfs_root_dir); }
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 11 lines · Laurent Pinchart
Hi Zhong,
Thank you for the patch.
Quoted 4 lines · On Friday, 17 August 2018 06:37:26 EEST zhong jiang wrote:
debugfs_remove_recursivehas taken null pointer into account. so remove the unneeded check.Signed-off-by zhong jiang <[email protected]>I already have a similar patch in my tree (
git://linuxtv.org/pinchartl/
media.git uvc/next) and will include it in my pull request for v4.20.
Thank you for let me know that. Maybe I miss that.
Sincerely,
zhong jiang
Quoted 16 lines
Quoted 16 lines
--- drivers/media/usb/uvc/uvc_debugfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)(quoted diff) +0
-0
b/drivers/media/usb/uvc/uvc_debugfs.cindex 368f8f8..6995aeb 100644drivers/media/usb/uvc/uvc_debugfs.c +1
-2@@ -128,6 +128,5 @@ void uvc_debugfs_init(void)void uvc_debugfs_cleanup (void ) { -if (uvc_debugfs_root_dir !=NULL ) -debugfs_remove_recursive (uvc_debugfs_root_dir); +debugfs_remove_recursive (uvc_debugfs_root_dir); }