diff mbox series

PCI: cadence: Fix static checker warning

Message ID 20200727125932.8951-1-kishon@ti.com
State Accepted
Headers show
Series PCI: cadence: Fix static checker warning | expand

Commit Message

Kishon Vijay Abraham I July 27, 2020, 12:59 p.m. UTC
Fix the following static checker warning

drivers/pci/controller/cadence/pcie-cadence-host.c:322 cdns_pcie_host_map_dma_ranges()
	warn: ignoring unreachable code.

Fixes: 	82d8567259b1 ("PCI: cadence: Use "dma-ranges" instead of "cdns,no-bar-match-nbits" property")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
Hi Lorenzo,

If possible can you squash this patch to "PCI: cadence: Use "dma-ranges" instead of
"cdns,no-bar-match-nbits" property".

Thanks
Kishon

 drivers/pci/controller/cadence/pcie-cadence-host.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Lorenzo Pieralisi July 27, 2020, 3:14 p.m. UTC | #1
On Mon, Jul 27, 2020 at 06:29:32PM +0530, Kishon Vijay Abraham I wrote:
> Fix the following static checker warning
> 
> drivers/pci/controller/cadence/pcie-cadence-host.c:322 cdns_pcie_host_map_dma_ranges()
> 	warn: ignoring unreachable code.
> 
> Fixes: 	82d8567259b1 ("PCI: cadence: Use "dma-ranges" instead of "cdns,no-bar-match-nbits" property")
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
> Hi Lorenzo,
> 
> If possible can you squash this patch to "PCI: cadence: Use "dma-ranges" instead of
> "cdns,no-bar-match-nbits" property".

Done, thanks !

Lorenzo
diff mbox series

Patch

diff --git a/drivers/pci/controller/cadence/pcie-cadence-host.c b/drivers/pci/controller/cadence/pcie-cadence-host.c
index ba157278fb0f..8d86560196aa 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;