Commit b1509e5d authored by Quentin Lambert's avatar Quentin Lambert Committed by Martin K. Petersen

scsi: isci: Add a missing call to pci_unmap_biosrom

Most error branches following the call to pci_map_biosrom contain a call
to pci_unmap_biosrom. This patch add these calls where they are missing.

This issue was found with Hector.
Signed-off-by: default avatarQuentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 5cfa2a3c
...@@ -54,6 +54,7 @@ struct isci_orom *isci_request_oprom(struct pci_dev *pdev) ...@@ -54,6 +54,7 @@ struct isci_orom *isci_request_oprom(struct pci_dev *pdev)
len = pci_biosrom_size(pdev); len = pci_biosrom_size(pdev);
rom = devm_kzalloc(&pdev->dev, sizeof(*rom), GFP_KERNEL); rom = devm_kzalloc(&pdev->dev, sizeof(*rom), GFP_KERNEL);
if (!rom) { if (!rom) {
pci_unmap_biosrom(oprom);
dev_warn(&pdev->dev, dev_warn(&pdev->dev,
"Unable to allocate memory for orom\n"); "Unable to allocate memory for orom\n");
return NULL; return NULL;
......
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