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

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>

authored by

Nicholas Mc Guire and committed by
Michal Simek
bd05a58d 021c9179

+1
+1
arch/microblaze/pci/xilinx_pci.c
··· 157 157 158 158 /* Set the max bus number to 255, and bus/subbus no's to 0 */ 159 159 pci_reg = of_iomap(pci_node, 0); 160 + WARN_ON(!pci_reg); 160 161 out_be32(pci_reg + XPLB_PCI_BUS, 0x000000ff); 161 162 iounmap(pci_reg); 162 163