Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Quentin Lambert and committed by
Martin K. Petersen
b1509e5d 5cfa2a3c

+1
+1
drivers/scsi/isci/probe_roms.c
··· 54 54 len = pci_biosrom_size(pdev); 55 55 rom = devm_kzalloc(&pdev->dev, sizeof(*rom), GFP_KERNEL); 56 56 if (!rom) { 57 + pci_unmap_biosrom(oprom); 57 58 dev_warn(&pdev->dev, 58 59 "Unable to allocate memory for orom\n"); 59 60 return NULL;