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: <87zheyu01m.wl-ashutosh.dixit@intel.com>
Date:   Tue, 07 Jan 2020 18:58:13 -0800
From:   "Dixit, Ashutosh" <ashutosh.dixit@...el.com>
To:     Xu Wang <vulab@...as.ac.cn>
CC:     <sudeep.dutt@...el.com>, <gregkh@...uxfoundation.org>,
        <arnd@...db.de>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mic: Remove unneeded NULL check

Reviewed-by: Ashutosh Dixit <ashutosh.dixit@...el.com>

On Tue, 07 Jan 2020 02:00:35 -0800, Xu Wang wrote:
>
> debugfs_remove_recursive will do NULL check, so remove
> the redundant null check.
>
> Signed-off-by: Xu Wang <vulab@...as.ac.cn>
> ---
>  drivers/misc/mic/card/mic_debugfs.c  | 3 ---
>  drivers/misc/mic/cosm/cosm_debugfs.c | 3 ---
>  drivers/misc/mic/host/mic_debugfs.c  | 3 ---
>  3 files changed, 9 deletions(-)
>
> diff --git a/drivers/misc/mic/card/mic_debugfs.c b/drivers/misc/mic/card/mic_debugfs.c
> index 3ee3d24..b586088 100644
> --- a/drivers/misc/mic/card/mic_debugfs.c
> +++ b/drivers/misc/mic/card/mic_debugfs.c
> @@ -65,9 +65,6 @@ void __init mic_create_card_debug_dir(struct mic_driver *mdrv)
>   */
>  void mic_delete_card_debug_dir(struct mic_driver *mdrv)
>  {
> -	if (!mdrv->dbg_dir)
> -		return;
> -
>	debugfs_remove_recursive(mdrv->dbg_dir);
>  }
>
> diff --git a/drivers/misc/mic/cosm/cosm_debugfs.c b/drivers/misc/mic/cosm/cosm_debugfs.c
> index 2fc9f4b..68a731f 100644
> --- a/drivers/misc/mic/cosm/cosm_debugfs.c
> +++ b/drivers/misc/mic/cosm/cosm_debugfs.c
> @@ -102,9 +102,6 @@ void cosm_create_debug_dir(struct cosm_device *cdev)
>
>  void cosm_delete_debug_dir(struct cosm_device *cdev)
>  {
> -	if (!cdev->dbg_dir)
> -		return;
> -
>	debugfs_remove_recursive(cdev->dbg_dir);
>  }
>
> diff --git a/drivers/misc/mic/host/mic_debugfs.c b/drivers/misc/mic/host/mic_debugfs.c
> index 8a8e416..ab0db7a 100644
> --- a/drivers/misc/mic/host/mic_debugfs.c
> +++ b/drivers/misc/mic/host/mic_debugfs.c
> @@ -129,9 +129,6 @@ void mic_create_debug_dir(struct mic_device *mdev)
>   */
>  void mic_delete_debug_dir(struct mic_device *mdev)
>  {
> -	if (!mdev->dbg_dir)
> -		return;
> -
>	debugfs_remove_recursive(mdev->dbg_dir);
>  }
>
> --
> 2.7.4
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ