Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0de6e914 authored by Maxime Ripard's avatar Maxime Ripard
Browse files

drm/sun4i: rgb: panel is an error pointer



In case of an error, our pointer to the drm_panel structure attached to our
encoder will hold an error pointer, not a NULL pointer.

Make sure we check the right thing.

Fixes: 29e57fab ("drm: sun4i: Add RGB output")
Signed-off-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
parent 0bbbb00b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -217,7 +217,7 @@ int sun4i_rgb_init(struct drm_device *drm)
	int ret;

	/* If we don't have a panel, there's no point in going on */
	if (!tcon->panel)
	if (IS_ERR(tcon->panel))
		return -ENODEV;

	rgb = devm_kzalloc(drm->dev, sizeof(*rgb), GFP_KERNEL);