Skip to content
Commit d37a0082 authored by Xiaofei Tan's avatar Xiaofei Tan Committed by Martin K. Petersen
Browse files

scsi: hisi_sas: fix free'ing in probe and remove



This patch addresses 4 problems in the module probe/remove:

 - When hisi_sas_shost_alloc() fails after we alloc shost memory, we
   should free shost memory before the function returns.

 - When hisi_sas_probe() fails after we alloc the HBA memories, we
   should also free the HBA memories.

 - We should free shost memory at the end of hisi_sas_remove().

 - sha->core.shost is set twice, so remove extra set.

Signed-off-by: default avatarXiaofei Tan <tanxiaofei@huawei.com>
Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
Reviewed-by: default avatarQuentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent e3cb0e47
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment