drm/bridge: it6505: Initialize AUX channel in it6505_i2c_probe
authorPin-yen Lin <treapking@chromium.org>
Thu, 13 Oct 2022 11:04:08 +0000 (19:04 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:03 +0000 (13:32 +0100)
commit172d4d64075075f955e6e416915e3f287eec514a
tree33ec582fedfdc9cff291e23456574bc7f39ed8bd
parent782175a601768723b40b0966c3d5869c838ed0ab
drm/bridge: it6505: Initialize AUX channel in it6505_i2c_probe

[ Upstream commit e577d4b13064c337b83fe7edecb3f34e87144821 ]

During device boot, the HPD interrupt could be triggered before the DRM
subsystem registers it6505 as a DRM bridge. In such cases, the driver
tries to access AUX channel and causes NULL pointer dereference.
Initializing the AUX channel earlier to prevent such error.

Fixes: b5c84a9edcd4 ("drm/bridge: add it6505 driver")
Signed-off-by: Pin-yen Lin <treapking@chromium.org>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20221013110411.1674359-2-treapking@chromium.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/bridge/ite-it6505.c