scsi: qla2xxx: Fix error handling in qlt_alloc_qfull_cmd()
authorBart Van Assche <bvanassche@acm.org>
Wed, 17 Apr 2019 21:44:27 +0000 (14:44 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:50:42 +0000 (14:50 +0100)
commitfd9fb99bef72fbfb7af5c0e14560681c010a056a
tree5ac0b2bb69cf5321dde5e9b7d860eb0b0af8abae
parent02224992926983562a9181124881c3704be439b1
scsi: qla2xxx: Fix error handling in qlt_alloc_qfull_cmd()

[ Upstream commit c04466c17142d5eb566984372b9a5003d1900fe3 ]

The test "if (!cmd)" is not useful because it is guaranteed that cmd !=
NULL.  Instead of testing the cmd pointer, rely on the tag to decide
whether or not command allocation failed.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Fixes: 33e799775593 ("qla2xxx: Add support for QFull throttling and Term Exchange retry") # v3.18.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/qla2xxx/qla_target.c