From: Quentin Lambert Date: Sat, 19 Nov 2016 17:43:40 +0000 (+0100) Subject: scsi: isci: Add a missing call to pci_unmap_biosrom X-Git-Tag: v4.14-rc1~1899^2~42 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b1509e5d2b478f362dbadfe721d5efc0162e3c8e;p=platform%2Fkernel%2Flinux-rpi3.git 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 Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/isci/probe_roms.c b/drivers/scsi/isci/probe_roms.c index 8ac646e..a2bbe46 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;