OSDN Git Service

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)
commitc29282c65d1cf54daeea63be46243d7f69d72f4d
treeb61f4e1808a5cc85b6c1b0cd3dc307815a96e803
parent282d10565ee9b574c40b1233a7a666034e76aa4c
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: 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>
drivers/scsi/qla2xxx/qla_bsg.c