aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2012-06-22 14:31:14 -0400
committerDan Williams <dan.j.williams@intel.com>2012-07-03 15:09:30 -0400
commit6d70a74ffd616073a68ae0974d98819bfa8e6da6 (patch)
tree5ad1db7feeabb7eb5bc6154f6a60db9ba5463167 /drivers/scsi/isci
parentf8f5701bdaf9134b1f90e5044a82c66324d2073f (diff)
isci: fix isci_pci_probe() generates warning on efi failure path
The oem parameter image embedded in the efi variable is at an offset from the start of the variable. However, in the failure path we try to free the 'orom' pointer which is only valid when the paramaters are being read from the legacy option-rom space. Since failure to load the oem parameters is unlikely and we keep the memory around in the success case just defer all de-allocation to devm. Cc: <stable@vger.kernel.org> Reported-by: Don Morris <don.morris@hp.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci')
-rw-r--r--drivers/scsi/isci/init.c1
-rw-r--r--drivers/scsi/isci/probe_roms.c1
2 files changed, 0 insertions, 2 deletions
diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c
index 47e28b555029..8870bd3b6383 100644
--- a/drivers/scsi/isci/init.c
+++ b/drivers/scsi/isci/init.c
@@ -641,7 +641,6 @@ static int __devinit isci_pci_probe(struct pci_dev *pdev, const struct pci_devic
641 orom->hdr.version)) { 641 orom->hdr.version)) {
642 dev_warn(&pdev->dev, 642 dev_warn(&pdev->dev,
643 "[%d]: invalid oem parameters detected, falling back to firmware\n", i); 643 "[%d]: invalid oem parameters detected, falling back to firmware\n", i);
644 devm_kfree(&pdev->dev, orom);
645 orom = NULL; 644 orom = NULL;
646 break; 645 break;
647 } 646 }
diff --git a/drivers/scsi/isci/probe_roms.c b/drivers/scsi/isci/probe_roms.c
index 4d95654c3fd4..8ac646e5eddc 100644
--- a/drivers/scsi/isci/probe_roms.c
+++ b/drivers/scsi/isci/probe_roms.c
@@ -104,7 +104,6 @@ struct isci_orom *isci_request_oprom(struct pci_dev *pdev)
104 104
105 if (i >= len) { 105 if (i >= len) {
106 dev_err(&pdev->dev, "oprom parse error\n"); 106 dev_err(&pdev->dev, "oprom parse error\n");
107 devm_kfree(&pdev->dev, rom);
108 rom = NULL; 107 rom = NULL;
109 } 108 }
110 pci_unmap_biosrom(oprom); 109 pci_unmap_biosrom(oprom);