summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2012-05-10 10:15:14 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-05-11 13:44:27 +0200
commit3a028bb99d1f1e5c444060a176cbd4bf93530df3 (patch)
tree198ca5954a9dd59e005c871374fffac355f7e6ab /drivers
parentOMAPDSS: OMAPFB: always allow to configure overlay (diff)
downloadlinux-3a028bb99d1f1e5c444060a176cbd4bf93530df3.tar.xz
linux-3a028bb99d1f1e5c444060a176cbd4bf93530df3.zip
OMAPFB: fix parsing of vram parameter
omapfb_parse_vram_param()'s check for end pointer returned from simple_strtoul() is wrong, causing the code to bug if the second or later vram parameters are non-parseable, for example "omapfb.vram=0:2M,:5M". However, even in that case the code will most likely bail out with -EINVAL in the following checks, so the bug is probably not a fatal one. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reported-by: Hein Tibosch <hein_tibosch@yahoo.es>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/omap2/omapfb/omapfb-main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index b00db4068d21..7f02e7f90d63 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -1502,7 +1502,7 @@ static int omapfb_parse_vram_param(const char *param, int max_entries,
fbnum = simple_strtoul(p, &p, 10);
- if (p == param)
+ if (p == start)
return -EINVAL;
if (*p != ':')