]> git.dujemihanovic.xyz Git - u-boot.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)
commit5a5024fee073fea1b2f72601c4f3f006451fd176
tree55ef04dc622e5334c33e5ce4734e9d15459aab1a
parenteb885c98ed57dd319e734a4c7d777c15a8007873
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