scsi: hisi_sas: Fix to only call scsi_get_prot_op() for non-NULL scsi_cmnd
authorJohn Garry <john.garry@huawei.com>
Fri, 25 Jan 2019 14:22:38 +0000 (22:22 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 29 Jan 2019 06:41:20 +0000 (01:41 -0500)
commite1ba0b0b44512c5a209526c09ea3eb7d256b6951
tree5fe44ac6f6602f214daf124a4b991acc2eb8ed8d
parent26889e5ec87a0e4ef31ba2dc4f60933be0dbdffe
scsi: hisi_sas: Fix to only call scsi_get_prot_op() for non-NULL scsi_cmnd

A NULL-pointer dereference was introduced for TMF SSP commands from the
upstreaming reworking.

Fix this by relocating the scsi_get_prot_op() callsite.

Fixes: d6a9000b81be ("scsi: hisi_sas: Add support for DIF feature for v2 hw")
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_v3_hw.c