* [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
* Re: [PATCH] media: NULL check is meaningless before debugfs_remove_recursive
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
0 siblings, 1 reply; 3+ messages in thread
From: Laurent Pinchart @ 2018-08-17 9:18 UTC (permalink / raw)
To: zhong jiang; +Cc: mchehab, linux-kernel
Hi Zhong,
Thank you for the patch.
On Friday, 17 August 2018 06:37:26 EEST zhong jiang wrote:
> debugfs_remove_recursive has taken null pointer into account. so
> remove the unneeded check.
>
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
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.
> ---
> 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);
> }
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] media: NULL check is meaningless before debugfs_remove_recursive
2018-08-17 9:18 ` Laurent Pinchart
@ 2018-08-17 12:21 ` zhong jiang
0 siblings, 0 replies; 3+ messages in thread
From: zhong jiang @ 2018-08-17 12:21 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: mchehab, linux-kernel
On 2018/8/17 17:18, Laurent Pinchart wrote:
> Hi Zhong,
>
> Thank you for the patch.
>
> On Friday, 17 August 2018 06:37:26 EEST zhong jiang wrote:
>> debugfs_remove_recursive has taken null pointer into account. so
>> remove the unneeded check.
>>
>> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> 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
>> ---
>> 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);
>> }
^ permalink raw reply [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).