]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
scsi: qla2xxx: Fix qla24xx_process_bidir_cmd()
authorBart Van Assche <bvanassche@acm.org>
Fri, 9 Aug 2019 03:01:48 +0000 (20:01 -0700)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:24:04 +0000 (14:24 -0300)
commit79c6b58a2256718960085a78a0ce79eaee90e790
treef6a23b62d37a16f918a9bcbb80b6309179af01bb
parentfea9fb42de03c6b2f8dc285ee08cee8d7852966a
scsi: qla2xxx: Fix qla24xx_process_bidir_cmd()

BugLink: https://bugs.launchpad.net/bugs/1856869
[ Upstream commit c29282c65d1cf54daeea63be46243d7f69d72f4d ]

Set the r??_data_len variables before using these instead of after.

This patch fixes the following Coverity complaint:

const: At condition req_data_len != rsp_data_len, the value of req_data_len
must be equal to 0.
const: At condition req_data_len != rsp_data_len, the value of rsp_data_len
must be equal to 0.
dead_error_condition: The condition req_data_len != rsp_data_len cannot be
true.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Fixes: a9b6f722f62d ("[SCSI] qla2xxx: Implementation of bidirectional.") # v3.7.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Tested-by: Himanshu Madhani <hmadhani@marvell.com>
Reviewed-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: Connor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/scsi/qla2xxx/qla_bsg.c