diff options
author | Nicholas Mc Guire <hofrat@osadl.org> | 2018-07-09 10:42:44 +0200 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2018-07-11 10:06:46 +0200 |
commit | bd05a58ddfd719015d66e8670af48feb386a3ca6 (patch) | |
tree | 465b8f5721c4eafef85a347ca519046059769009 | |
parent | Linux 4.18-rc3 (diff) | |
download | linux-bd05a58ddfd719015d66e8670af48feb386a3ca6.tar.xz linux-bd05a58ddfd719015d66e8670af48feb386a3ca6.zip |
microblaze: warn if of_iomap() failed
of_iomap() can return NULL. The function is void thus error propagation
is not possible but at least a WARN_ON() seems warranted here as a silent
failure might lead to a hard to understand system state.
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
-rw-r--r-- | arch/microblaze/pci/xilinx_pci.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/microblaze/pci/xilinx_pci.c b/arch/microblaze/pci/xilinx_pci.c index 14c7da5fd039..b800909ddccf 100644 --- a/arch/microblaze/pci/xilinx_pci.c +++ b/arch/microblaze/pci/xilinx_pci.c @@ -157,6 +157,7 @@ void __init xilinx_pci_init(void) /* Set the max bus number to 255, and bus/subbus no's to 0 */ pci_reg = of_iomap(pci_node, 0); + WARN_ON(!pci_reg); out_be32(pci_reg + XPLB_PCI_BUS, 0x000000ff); iounmap(pci_reg); |