1
0
Fork 0

staging: unisys: visorhba: viosrhba_main.c: Remove unnecessary checks

Removes unnecessary checks for a NULL pointer in a non-API function.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
hifive-unleashed-5.1
David Binder 2017-07-17 16:16:48 -04:00 committed by Greg Kroah-Hartman
parent b06f5d1116
commit 0d89f94afb
1 changed files with 1 additions and 4 deletions

View File

@ -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);
}
@ -829,7 +826,7 @@ do_scsi_linuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
static int set_no_disk_inquiry_result(unsigned char *buf,
size_t len, bool is_lun0)
{
if (!buf || len < NO_DISK_INQUIRY_RESULT_LEN)
if (len < NO_DISK_INQUIRY_RESULT_LEN)
return -EINVAL;
memset(buf, 0, NO_DISK_INQUIRY_RESULT_LEN);
buf[2] = SCSI_SPC2_VER;