]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
commitc135532d2507e26e873df2b5b4ecb5771b005cec
tree723790e74d1cac51cab4d8133df02b75504a03cc
parent8339e614be6fe1177e524118b1ae49d682b60d8b
scsi: qla2xxx: Fix error handling in qlt_alloc_qfull_cmd()

BugLink: https://bugs.launchpad.net/bugs/1863019
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/scsi/qla2xxx/qla_target.c