mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-04 06:06:44 +07:00
OMAPDSS: HDMI: Fix possible NULL reference
Commit 5391e87d12
(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>
This commit is contained in:
parent
53bd1a4283
commit
db680c6515
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user