summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Lambert <lambert.quentin@gmail.com>2016-11-19 18:43:40 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2016-11-29 11:50:21 -0500
commitb1509e5d2b478f362dbadfe721d5efc0162e3c8e (patch)
treef4d1c4d79822e0048f646360805a2e117e2fd411
parent5cfa2a3c7342bd0b50716c8bb32ee491af43c785 (diff)
downloadlinux-b1509e5d2b478f362dbadfe721d5efc0162e3c8e.tar.gz
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: Quentin Lambert <lambert.quentin@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/isci/probe_roms.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/isci/probe_roms.c b/drivers/scsi/isci/probe_roms.c
index 8ac646e5eddc..a2bbe46f8ccb 100644
--- a/drivers/scsi/isci/probe_roms.c
+++ b/drivers/scsi/isci/probe_roms.c
@@ -54,6 +54,7 @@ struct isci_orom *isci_request_oprom(struct pci_dev *pdev)
len = pci_biosrom_size(pdev);
rom = devm_kzalloc(&pdev->dev, sizeof(*rom), GFP_KERNEL);
if (!rom) {
+ pci_unmap_biosrom(oprom);
dev_warn(&pdev->dev,
"Unable to allocate memory for orom\n");
return NULL;