xhci: host: potential NULL dereference in xhci_generic_plat_probe()
authorDan Carpenter <error27@gmail.com>
Thu, 9 Feb 2023 13:43:45 +0000 (16:43 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Feb 2023 13:22:57 +0000 (14:22 +0100)
commit77191db5ba7bd321fbbf4315675ee774a2b5a362
tree34a0a376f5584eebffbe7831b4993bab7205d55b
parentc4a07e264d38d5cad5d77298957cbd7d7db70b1f
xhci: host: potential NULL dereference in xhci_generic_plat_probe()

It's possible to exit the loop with "sysdev" set to NULL.  In that
case we should use "&pdev->dev".

Fixes: ec5499d338ec ("xhci: split out rcar/rz support from xhci-plat.c")
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/Y+T4kTcJwRwxNHJq@kili
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-plat.c