scsi: mvsas: replace kfree with scsi_host_put
authorPan Bian <bianpan2016@163.com>
Tue, 8 Aug 2017 12:02:51 +0000 (20:02 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 10 Aug 2017 23:55:35 +0000 (19:55 -0400)
commitcf99dc30bcc56c33243b5bbfef9d8ea943dd2e1c
treeae11586a011e821c72fbc85a8f4ff59877aafbd0
parentbc1371c181b503fe925ae292cd96618f305790cd
scsi: mvsas: replace kfree with scsi_host_put

The return value of scsi_host_alloc() should be released by
scsi_host_put(). However, in function mvs_pci_init(), kfree()
is used. This patch replaces kfree() with scsi_host_put() to avoid
possible memory leaks.

Signed-off-by: Pan Bian <bianpan2016@163.com>
Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mvsas/mv_init.c