scsi: qla2xxx: Replace fcport alloc with qla2x00_alloc_fcport
authorQuinn Tran <quinn.tran@cavium.com>
Mon, 4 Dec 2017 22:45:10 +0000 (14:45 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Mar 2018 09:54:26 +0000 (10:54 +0100)
commit0b42928ca54c2ab5e6f7daa21e570e12dd3065ed
tree30af6c6d164879be30da638b20ba370ac4079d5c
parent11739154e650aec048e95a86bf2ab58e91473fdb
scsi: qla2xxx: Replace fcport alloc with qla2x00_alloc_fcport

commit 063b36d6b0ad74c748d536f5cb47bac2f850a0fa upstream.

Current code manually allocate an fcport structure that is not properly
initialize. Replace kzalloc with qla2x00_alloc_fcport, so that all
fields are initialized.  Also set set scan flag to port found

Cc: <stable@vger.kernel.org>
Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/qla2xxx/qla_target.c