Commit 62aa2814 authored by Himanshu Madhani's avatar Himanshu Madhani Committed by Martin K. Petersen

scsi: qla2xxx: Fix smatch warning in qla25xx_delete_{rsp|req}_que

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: 7867b98d ("scsi: qla2xxx: Fix memory leak in dual/target mode")
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarHimanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent b1284588
...@@ -582,8 +582,9 @@ qla25xx_delete_req_que(struct scsi_qla_host *vha, struct req_que *req) ...@@ -582,8 +582,9 @@ qla25xx_delete_req_que(struct scsi_qla_host *vha, struct req_que *req)
ret = qla25xx_init_req_que(vha, req); ret = qla25xx_init_req_que(vha, req);
if (ret != QLA_SUCCESS) if (ret != QLA_SUCCESS)
return QLA_FUNCTION_FAILED; return QLA_FUNCTION_FAILED;
}
qla25xx_free_req_que(vha, req); qla25xx_free_req_que(vha, req);
}
return ret; return ret;
} }
...@@ -598,8 +599,9 @@ qla25xx_delete_rsp_que(struct scsi_qla_host *vha, struct rsp_que *rsp) ...@@ -598,8 +599,9 @@ qla25xx_delete_rsp_que(struct scsi_qla_host *vha, struct rsp_que *rsp)
ret = qla25xx_init_rsp_que(vha, rsp); ret = qla25xx_init_rsp_que(vha, rsp);
if (ret != QLA_SUCCESS) if (ret != QLA_SUCCESS)
return QLA_FUNCTION_FAILED; return QLA_FUNCTION_FAILED;
}
qla25xx_free_rsp_que(vha, rsp); qla25xx_free_rsp_que(vha, rsp);
}
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment