summaryrefslogtreecommitdiff
path: root/drivers/video/omap2
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2013-08-27 11:11:48 (GMT)
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-08-29 13:43:43 (GMT)
commitdb680c65156083c8780044f46f7a74544fcb3ce2 (patch)
tree4da05b2d46f576f40b5c82d8d6aabd21443e3e0c /drivers/video/omap2
parent53bd1a4283798dfa392442cf28b6ee94b54e3284 (diff)
downloadlinux-db680c65156083c8780044f46f7a74544fcb3ce2.tar.xz
OMAPDSS: HDMI: Fix possible NULL reference
Commit 5391e87d1259 (OMAPDSS: remove dispc's dependency to VENC/HDMI) introduced a possible NULL reference bug in the HDMI driver when setting timings. In practice the bug shouldn't happen, as the timings have been verified earlier, and thus the timings should always be ok. Fix the possible issue by moving the use of the timings pointer inside the NULL check. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Diffstat (limited to 'drivers/video/omap2')
-rw-r--r--drivers/video/omap2/dss/hdmi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index 44a885b..ea97854 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -666,10 +666,11 @@ void omapdss_hdmi_display_set_timing(struct omap_dss_device *dssdev,
hdmi.ip_data.cfg.cm = cm;
t = hdmi_get_timings();
- if (t != NULL)
+ if (t != NULL) {
hdmi.ip_data.cfg = *t;
- dispc_set_tv_pclk(t->timings.pixel_clock * 1000);
+ dispc_set_tv_pclk(t->timings.pixel_clock * 1000);
+ }
mutex_unlock(&hdmi.lock);
}