linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: NULL check is meaningless before debugfs_remove_recursive
@ 2018-08-17  3:37 zhong jiang
  2018-08-17  9:18 ` Laurent Pinchart
  0 siblings, 1 reply; 3+ messages in thread
From: zhong jiang @ 2018-08-17  3:37 UTC (permalink / raw)
  To: laurent.pinchart, mchehab; +Cc: linux-kernel

debugfs_remove_recursive has taken null pointer into account. so
remove the unneeded check.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
 drivers/media/usb/uvc/uvc_debugfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/usb/uvc/uvc_debugfs.c b/drivers/media/usb/uvc/uvc_debugfs.c
index 368f8f8..6995aeb 100644
--- a/drivers/media/usb/uvc/uvc_debugfs.c
+++ b/drivers/media/usb/uvc/uvc_debugfs.c
@@ -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);
 }
-- 
1.7.12.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-17 12:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-17  3:37 [PATCH] media: NULL check is meaningless before debugfs_remove_recursive zhong jiang
2018-08-17  9:18 ` Laurent Pinchart
2018-08-17 12:21   ` zhong jiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).