lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1774555.GGbckhaAKE@avalon>
Date:   Tue, 07 Aug 2018 01:48:15 +0300
From:   Laurent Pinchart <laurent.pinchart@...asonboard.com>
To:     "Gustavo A. R. Silva" <garsilva@...eddedor.com>
Cc:     Mauro Carvalho Chehab <mchehab@...nel.org>,
        linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: uvc_debugfs: remove unnecessary NULL check before debugfs_remove_recursive

Hi Gustavo,

Thank you for the patch.

On Sunday, 12 November 2017 10:18:59 EEST Gustavo A. R. Silva wrote:
> NULL check before freeing functions like debugfs_remove_recursive
> is not needed.

"functions like debugfs_remove_recursive" seems a bit vague to me. I'd prefer 
being more precise here, and say that "debugfs_remove_recursive() accepts a 
NULL parameter and returns immediately, there's no need for a NULL check in 
the caller.".

> 
> This issue was detected with the help of Coccinelle.
> 
> Signed-off-by: Gustavo A. R. Silva <garsilva@...eddedor.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);
>  }

There's another occurrence in uvc_debugfs_cleanup_stream(). I'll address it as 
well in this patch. With that change and the commit message update,

Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>

and applied to my tree.

-- 
Regards,

Laurent Pinchart



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ