scsi: qla2xxx: Fix smatch warning in qla25xx_delete_{rsp|req}_que
authorHimanshu Madhani <himanshu.madhani@cavium.com>
Sun, 17 Dec 2017 00:05:09 +0000 (16:05 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Mar 2018 11:06:45 +0000 (12:06 +0100)
commit8cdd1908c17492cb6176d63d279de2534342b369
tree920d4cb16a0624e55b83de1fcb15eb2dea6978f4
parent1a8902505673e41b44f357014706f7fd907f18f3
scsi: qla2xxx: Fix smatch warning in qla25xx_delete_{rsp|req}_que

commit 62aa281470fdb7c0796d63a1cc918a8c1f02dde2 upstream.

This patch fixes following warnings reported by smatch:

drivers/scsi/qla2xxx/qla_mid.c:586 qla25xx_delete_req_que()
error: we previously assumed 'req' could be null (see line 580)

drivers/scsi/qla2xxx/qla_mid.c:602 qla25xx_delete_rsp_que()
error: we previously assumed 'rsp' could be null (see line 596)

Fixes: 7867b98dceb7 ("scsi: qla2xxx: Fix memory leak in dual/target mode")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/qla2xxx/qla_mid.c