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: <CAHp75Ve-nZsyvHJcVJxb7wfk=0NDw7mwGdoZwh+VD6nnJpuNJg@mail.gmail.com>
Date:   Thu, 6 Dec 2018 04:37:18 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     wen.yang99@....com.cn
Cc:     Darren Hart <dvhart@...radead.org>,
        Andy Shevchenko <andy@...radead.org>,
        Platform Driver <platform-driver-x86@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        zhong.weidong@....com.cn
Subject: Re: [PATCH] platform/x86: intel_ips: Remove unnecessary NULL check
 before debugfs_remove_recursive

On Thu, Dec 6, 2018 at 3:09 AM Wen Yang <wen.yang99@....com.cn> wrote:
>
> 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.
>

Thank you, similar patch is already in my queue.

> Signed-off-by: Wen Yang <wen.yang99@....com.cn>
> CC: Darren Hart <dvhart@...radead.org>
> CC: Andy Shevchenko <andy@...radead.org>
> CC: platform-driver-x86@...r.kernel.org
> CC: linux-kernel@...r.kernel.org
> ---
>  drivers/platform/x86/intel_ips.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/platform/x86/intel_ips.c b/drivers/platform/x86/intel_ips.c
> index 225638a1b09e..f8175b972537 100644
> --- a/drivers/platform/x86/intel_ips.c
> +++ b/drivers/platform/x86/intel_ips.c
> @@ -1300,9 +1300,7 @@ static const struct file_operations ips_debugfs_ops = {
>
>  static void ips_debugfs_cleanup(struct ips_driver *ips)
>  {
> -       if (ips->debug_root)
> -               debugfs_remove_recursive(ips->debug_root);
> -       return;
> +       debugfs_remove_recursive(ips->debug_root);
>  }
>
>  static void ips_debugfs_init(struct ips_driver *ips)
> --
> 2.19.1
>


-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ