]> git.baikalelectronics.ru Git - uboot.git/commit
usb: xhci-pci: Check for errors from dm_pci_map_bar()
authorPali Rohár <pali@kernel.org>
Mon, 18 Jan 2021 11:30:04 +0000 (12:30 +0100)
committerMarek Vasut <marex@denx.de>
Wed, 10 Feb 2021 21:23:24 +0000 (22:23 +0100)
commit795c8ef0239eb916b1d3e7a0b3b88ce22f3c4717
tree55ef04dc622e5334c33e5ce4734e9d15459aab1a
parent1e18f2e4c3022725f69c49e22ba4ac4631c579d0
usb: xhci-pci: Check for errors from dm_pci_map_bar()

Function dm_pci_map_bar() may fail and returns NULL. Check this to prevent
dereferencing a NULL pointer.

In xhci-pci this may happen when board does not enable CONFIG_PCI_PNP and
PCI_BASE_ADDRESS_0 contains unconfigured zero address.

Signed-off-by: Pali Rohár <pali@kernel.org>
drivers/usb/host/xhci-pci.c