diff options
author | Xiaofei Tan <tanxiaofei@huawei.com> | 2016-11-29 23:45:57 +0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-12-05 16:54:12 -0500 |
commit | d37a0082919360dda828679cccb5c4e8e83ec199 (patch) | |
tree | 62b1eb4c4ea94fa522d7e25c44068e780930b3ce /drivers/scsi/hpsa.c | |
parent | e3cb0e47b9233a42f8c5865ad748666b6bbbc12f (diff) |
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: Xiaofei Tan <tanxiaofei@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Reviewed-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/hpsa.c')
0 files changed, 0 insertions, 0 deletions