drm/vc4: hdmi: Fix pointer dereference before check

Commit 6bed2ea3cb ("drm/vc4: hdmi: Reset link on hotplug") introduced
the vc4_hdmi_reset_link() function. This function dereferences the
"connector" pointer before checking whether it is NULL or not.

Rework variable assignment to avoid this issue.

Fixes: 6bed2ea3cb ("drm/vc4: hdmi: Reset link on hotplug")
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Link: https://lore.kernel.org/r/20221110134752.238820-3-jose.exposito89@gmail.com
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
This commit is contained in:
José Expósito 2022-11-10 14:47:52 +01:00 • committed by Maxime Ripard
commit 0a99962c0d
No known key found for this signature in database
GPG key ID: E3EF0D6F671851C5