Commit 7cf77b27 authored by Thierry Reding's avatar Thierry Reding

drm/tegra: hub: Fix dereference before check

Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent 9e98c678
...@@ -378,14 +378,16 @@ static int tegra_shared_plane_atomic_check(struct drm_plane *plane, ...@@ -378,14 +378,16 @@ static int tegra_shared_plane_atomic_check(struct drm_plane *plane,
static void tegra_shared_plane_atomic_disable(struct drm_plane *plane, static void tegra_shared_plane_atomic_disable(struct drm_plane *plane,
struct drm_plane_state *old_state) struct drm_plane_state *old_state)
{ {
struct tegra_dc *dc = to_tegra_dc(old_state->crtc);
struct tegra_plane *p = to_tegra_plane(plane); struct tegra_plane *p = to_tegra_plane(plane);
struct tegra_dc *dc;
u32 value; u32 value;
/* rien ne va plus */ /* rien ne va plus */
if (!old_state || !old_state->crtc) if (!old_state || !old_state->crtc)
return; return;
dc = to_tegra_dc(old_state->crtc);
/* /*
* XXX Legacy helpers seem to sometimes call ->atomic_disable() even * XXX Legacy helpers seem to sometimes call ->atomic_disable() even
* on planes that are already disabled. Make sure we fallback to the * on planes that are already disabled. Make sure we fallback to the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment