]> git.baikalelectronics.ru Git - 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)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 13 Aug 2019 01:34:06 +0000 (21:34 -0400)
commitf32e13599a017b4d118b7390b535b0d86e958869
treeb61f4e1808a5cc85b6c1b0cd3dc307815a96e803
parent063d7e7e79fb7e92e95f350a13733c6f48e2bfca
scsi: qla2xxx: Fix qla24xx_process_bidir_cmd()

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: 6fe9b488df79 ("[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>
drivers/scsi/qla2xxx/qla_bsg.c