Commit 5dc34688 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Martin K. Petersen

scsi: qla2xxx: Reuse existing error handling path

There is no need to duplicate code, use the existing error handling path to
free resources. This is more future-proof.

Link: https://lore.kernel.org/r/6973844a1532ec2dc8e86f3533362e79d78ed774.1618132821.git.christophe.jaillet@wanadoo.frReviewed-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent efd26171
......@@ -2585,8 +2585,8 @@ qla2x00_get_host_stats(struct bsg_job *bsg_job)
data = kzalloc(response_len, GFP_KERNEL);
if (!data) {
kfree(req_data);
return -ENOMEM;
ret = -ENOMEM;
goto host_stat_out;
}
ret = qla2xxx_get_ini_stats(fc_bsg_to_shost(bsg_job), req_data->stat_type,
......
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