projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db1689a
)
drm/fb: Fix pointer dereference before null check.
author
David Lechner
<david@lechnology.com>
Wed, 2 Aug 2017 18:00:13 +0000
(13:00 -0500)
committer
Daniel Vetter
<daniel.vetter@ffwll.ch>
Thu, 3 Aug 2017 10:12:15 +0000
(12:12 +0200)
fb_crtc is used before a null check, so move the use after the null check.
This was just identified by inspection. I haven't actually observed a crash
here, so it is possible that the null check could be unnecessary.
Signed-off-by: David Lechner <david@lechnology.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link:
https://patchwork.freedesktop.org/patch/msgid/1501696813-8807-1-git-send-email-david@lechnology.com
drivers/gpu/drm/drm_fb_helper.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpu/drm/drm_fb_helper.c
b/drivers/gpu/drm/drm_fb_helper.c
index 4b968f5b9c8503dcc5998c208520b10bc34d5b4f..b2a01d17018190d0d90e8c89e81800046f5f5cf4 100644
(file)
--- a/
drivers/gpu/drm/drm_fb_helper.c
+++ b/
drivers/gpu/drm/drm_fb_helper.c
@@
-2410,9
+2410,9
@@
static void drm_setup_crtcs(struct drm_fb_helper *fb_helper,
struct drm_display_mode *mode = modes[i];
struct drm_fb_helper_crtc *fb_crtc = crtcs[i];
struct drm_fb_offset *offset = &offsets[i];
- struct drm_mode_set *modeset = &fb_crtc->mode_set;
if (mode && fb_crtc) {
+ struct drm_mode_set *modeset = &fb_crtc->mode_set;
struct drm_connector *connector =
fb_helper->connector_info[i]->connector;