diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2016-05-04 17:37:58 +0200 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@free-electrons.com> | 2016-05-30 08:28:33 +0200 |
commit | 0de6e914a035076b1241f5738c06c9d3820abd6e (patch) | |
tree | 004330f8eb98fda74a2810667b251342119234c2 /drivers/gpu/drm | |
parent | 0bbbb00bda57e6f091275b0103445596322b9277 (diff) | |
download | op-kernel-dev-0de6e914a035076b1241f5738c06c9d3820abd6e.zip op-kernel-dev-0de6e914a035076b1241f5738c06c9d3820abd6e.tar.gz |
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: 29e57fab97fc ("drm: sun4i: Add RGB output")
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/sun4i/sun4i_rgb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/sun4i/sun4i_rgb.c b/drivers/gpu/drm/sun4i/sun4i_rgb.c index fe7ef52..aaffe9e 100644 --- a/drivers/gpu/drm/sun4i/sun4i_rgb.c +++ b/drivers/gpu/drm/sun4i/sun4i_rgb.c @@ -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); |