Re: [PATCH 08/42] staging: unisys: visorhba: viosrhba_main.c: Remove unnecessary checks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 17, 2017 at 04:16:48PM -0400, David Kershner wrote:
> From: David Binder <david.binder@xxxxxxxxxx>
> 
> Removes unnecessary checks for a NULL pointer in a non-API function.
> 
> Signed-off-by: David Binder <david.binder@xxxxxxxxxx>
> Signed-off-by: David Kershner <david.kershner@xxxxxxxxxx>
> Reviewed-by: David Binder <david.binder@xxxxxxxxxx>
> ---
>  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
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux