aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm/msm_fbdev.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2018-04-25 21:09:04 -0400
committerDave Airlie <airlied@redhat.com>2018-04-25 21:09:04 -0400
commit14cdea89459e71e38027aa4fb1099c29f4c53316 (patch)
tree6a0606e5f281a802e31fb9f6763c1d87f92ad1fa /drivers/gpu/drm/msm/msm_fbdev.c
parent8eb8ad52fbc99aa87f1c56db378ee910833ed780 (diff)
parent789d4c300e10eb2096ee83c3497118e67ccc951e (diff)
Merge tag 'drm-msm-fixes-2018-04-25' of git://people.freedesktop.org/~robclark/linux into drm-fixes
A few fixes for 4.17.. thanks to Sean for helping pull together some of the display related fixes while I was off in compute-land. * tag 'drm-msm-fixes-2018-04-25' of git://people.freedesktop.org/~robclark/linux: drm/msm: don't deref error pointer in the msm_fbdev_create error path drm/msm/dsi: use correct enum in dsi_get_cmd_fmt drm/msm: Fix possible null dereference on failure of get_pages() drm/msm: Add modifier to mdp_get_format arguments drm/msm: Mark the crtc->state->event consumed drm/msm/dsi: implement auto PHY timing calculator for 10nm PHY drm/msm/dsi: check video mode engine status before waiting drm/msm/dsi: check return value for video done waits
Diffstat (limited to 'drivers/gpu/drm/msm/msm_fbdev.c')
-rw-r--r--drivers/gpu/drm/msm/msm_fbdev.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/gpu/drm/msm/msm_fbdev.c b/drivers/gpu/drm/msm/msm_fbdev.c
index c178563fcd4d..456622b46335 100644
--- a/drivers/gpu/drm/msm/msm_fbdev.c
+++ b/drivers/gpu/drm/msm/msm_fbdev.c
@@ -92,8 +92,7 @@ static int msm_fbdev_create(struct drm_fb_helper *helper,
92 92
93 if (IS_ERR(fb)) { 93 if (IS_ERR(fb)) {
94 dev_err(dev->dev, "failed to allocate fb\n"); 94 dev_err(dev->dev, "failed to allocate fb\n");
95 ret = PTR_ERR(fb); 95 return PTR_ERR(fb);
96 goto fail;
97 } 96 }
98 97
99 bo = msm_framebuffer_bo(fb, 0); 98 bo = msm_framebuffer_bo(fb, 0);
@@ -151,13 +150,7 @@ static int msm_fbdev_create(struct drm_fb_helper *helper,
151 150
152fail_unlock: 151fail_unlock:
153 mutex_unlock(&dev->struct_mutex); 152 mutex_unlock(&dev->struct_mutex);
154fail: 153 drm_framebuffer_remove(fb);
155
156 if (ret) {
157 if (fb)
158 drm_framebuffer_remove(fb);
159 }
160
161 return ret; 154 return ret;
162} 155}
163 156