Patch "PCI: cadence: Fix DMA range mapping early return error" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    PCI: cadence: Fix DMA range mapping early return error

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     pci-cadence-fix-dma-range-mapping-early-return-error.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit e86573ad8bf9b4ae6ab1b9292ee3f4a17f3419b3
Author: Krzysztof WilczyÅ?ski <kw@xxxxxxxxx>
Date:   Tue Feb 16 20:59:35 2021 +0000

    PCI: cadence: Fix DMA range mapping early return error
    
    [ Upstream commit 1002573ee33efef0988a9a546c075a9fa37d2498 ]
    
    Function cdns_pcie_host_map_dma_ranges() iterates over a PCIe host bridge
    DMA ranges using the resource_list_for_each_entry() iterator, returning an
    error if cdns_pcie_host_bar_config() fails.
    
    49e427e6bdd1 ("Merge branch 'pci/host-probe-refactor'") botched a merge so
    it *always* returned after the first DMA range, even if no error occurred.
    
    Fix the error checking so we return early only when an error occurs.
    
    [bhelgaas: commit log]
    Fixes: 49e427e6bdd1 ("Merge branch 'pci/host-probe-refactor'")
    Link: https://lore.kernel.org/r/20210216205935.3112661-1-kw@xxxxxxxxx
    Signed-off-by: Krzysztof WilczyÅ?ski <kw@xxxxxxxxx>
    Signed-off-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/pci/controller/cadence/pcie-cadence-host.c b/drivers/pci/controller/cadence/pcie-cadence-host.c
index 811c1cb2e8deb..1cb7cfc75d6e4 100644
--- a/drivers/pci/controller/cadence/pcie-cadence-host.c
+++ b/drivers/pci/controller/cadence/pcie-cadence-host.c
@@ -321,9 +321,10 @@ static int cdns_pcie_host_map_dma_ranges(struct cdns_pcie_rc *rc)
 
 	resource_list_for_each_entry(entry, &bridge->dma_ranges) {
 		err = cdns_pcie_host_bar_config(rc, entry);
-		if (err)
+		if (err) {
 			dev_err(dev, "Fail to configure IB using dma-ranges\n");
-		return err;
+			return err;
+		}
 	}
 
 	return 0;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux