On Mon, Jul 17, 2017 at 04:16:48PM -0400, David Kershner wrote:
> From: David Binder <david.bin...@unisys.com>
> 
> Removes unnecessary checks for a NULL pointer in a non-API function.
> 
> Signed-off-by: David Binder <david.bin...@unisys.com>
> Signed-off-by: David Kershner <david.kersh...@unisys.com>
> Reviewed-by: David Binder <david.bin...@unisys.com>
> ---
>  drivers/staging/unisys/visorhba/visorhba_main.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c 
> b/drivers/staging/unisys/visorhba/visorhba_main.c
> index 17468bf..1b4b338 100644
> --- a/drivers/staging/unisys/visorhba/visorhba_main.c
> +++ b/drivers/staging/unisys/visorhba/visorhba_main.c
> @@ -141,9 +141,6 @@ static struct task_struct *visor_thread_start
>   */
>  static void visor_thread_stop(struct task_struct *task)
>  {
> -     /* no thread running */
> -     if (!task)
> -             return;
>       kthread_stop(task);
>  }

Why is this a wrapper function at all anyway?  Why not just call
kthread_stop() instead of visor_thread_stop()?

I'll take this, but you should get rid of it in the future.

thanks,

greg k-h
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to