mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-18 18:23:53 +08:00
[SCSI] be2iscsi: Free tags allocated
This patch frees tags that are already allocated in case of failure Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
parent
4f5af07e1b
commit
5db3f33d68
@ -168,6 +168,7 @@ unsigned int mgmt_invalidate_icds(struct beiscsi_hba *phba,
|
|||||||
SE_DEBUG(DBG_LVL_1,
|
SE_DEBUG(DBG_LVL_1,
|
||||||
"Failed to alloc memory for mgmt_invalidate_icds\n");
|
"Failed to alloc memory for mgmt_invalidate_icds\n");
|
||||||
spin_unlock(&ctrl->mbox_lock);
|
spin_unlock(&ctrl->mbox_lock);
|
||||||
|
free_mcc_tag(&phba->ctrl, tag);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
nonemb_cmd.size = sizeof(struct invalidate_commands_params_in);
|
nonemb_cmd.size = sizeof(struct invalidate_commands_params_in);
|
||||||
@ -330,6 +331,7 @@ int mgmt_open_connection(struct beiscsi_hba *phba,
|
|||||||
shost_printk(KERN_ERR, phba->shost, "unknown addr family %d\n",
|
shost_printk(KERN_ERR, phba->shost, "unknown addr family %d\n",
|
||||||
dst_addr->sa_family);
|
dst_addr->sa_family);
|
||||||
spin_unlock(&ctrl->mbox_lock);
|
spin_unlock(&ctrl->mbox_lock);
|
||||||
|
free_mcc_tag(&phba->ctrl, tag);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user