scsi: hisi_sas: Move evaluation of hisi_hba in hisi_sas_task_prep()
authorLuo Jiaxing <luojiaxing@huawei.com>
Mon, 24 Sep 2018 15:06:29 +0000 (23:06 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 16 Oct 2018 04:27:04 +0000 (00:27 -0400)
commit1668e3b6f8f8ed2ce685691c92b90dfadeaa3f2f
tree7e7377c370dabeb8c0afbeedbd981991820deec0
parent5a54691f874ab29ec82f08bc6936866a3ccdaa91
scsi: hisi_sas: Move evaluation of hisi_hba in hisi_sas_task_prep()

In evaluating hisi_hba, the sas_port may be NULL, so for safety relocate
the the check to value possible NULL deference.

Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hisi_sas/hisi_sas_main.c