drm/bridge: Fix a NULL pointer dereference in drm_atomic_bridge_chain_check()
commitb18398c16e176513502f962b642f89225039ef1f
authorBoris Brezillon <boris.brezillon@collabora.com>
Tue, 7 Jan 2020 11:30:31 +0000 (7 12:30 +0100)
committerBoris Brezillon <boris.brezillon@collabora.com>
Tue, 7 Jan 2020 13:19:54 +0000 (7 14:19 +0100)
tree2425c057a17c762c7491456e8aca9197196c8d13
parent3cacb2086e41bbdf4a43e494d47d05db356992b9
drm/bridge: Fix a NULL pointer dereference in drm_atomic_bridge_chain_check()

drm_atomic_bridge_chain_check() callers can pass a NULL bridge. Let's
bail out before dereferencing the bridge pointer when that happens.

Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
Fixes: b86d895524ab ("drm/bridge: Add an ->atomic_check() hook")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20200107113031.435604-1-boris.brezillon@collabora.com
drivers/gpu/drm/drm_bridge.c