From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Mon, 18 Jan 2021 14:27:41 +0100 Subject: [PATCH v2] usb: xhci-pci: Check for errors from dm_pci_map_bar() In-Reply-To: <20210118113004.16850-1-pali@kernel.org> References: <20210118113004.16850-1-pali@kernel.org> Message-ID: <340b243a-9680-da44-e50b-10401c620fe5@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 18.01.21 12:30, Pali Roh?r wrote: > 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 Reviewed-by: Stefan Roese Thanks, Stefan