]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
OMAPDSS: VENC: fix NULL pointer dereference in DSS2 VENC sysfs debug attr on OMAP4
authorDanny Kukawka <danny.kukawka@bisect.de>
Tue, 24 Jan 2012 15:44:42 +0000 (16:44 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 30 May 2012 23:43:55 +0000 (00:43 +0100)
commit cc1d3e032df53d83d0ca4d537d8eb67eb5b3e808 upstream.

Commit ba02fa37de80bea10d706f39f076dd848348320a disabled the
venc driver registration on OMAP4. Since the driver never gets
probed/initialised your get a dereferenceed NULL pointer if you
try to get info from /sys/kernel/debug/omapdss/venc

Return info message about disabled venc if venc_dump_regs() gets called.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/video/omap2/dss/venc.c

index 7533458ba4d24effd08aced87cff7c2ff47eb418..7152b53d14c08a9cef19f8e48aaad4799de795d9 100644 (file)
@@ -679,6 +679,11 @@ void venc_dump_regs(struct seq_file *s)
 {
 #define DUMPREG(r) seq_printf(s, "%-35s %08x\n", #r, venc_read_reg(r))
 
+       if (cpu_is_omap44xx()) {
+               seq_printf(s, "VENC currently disabled on OMAP44xx\n");
+               return;
+       }
+
        if (venc_runtime_get())
                return;