diff --git a/drivers/video/msm/mdss/mdss_debug.c b/drivers/video/msm/mdss/mdss_debug.c index feb73bc..759ed14 100644 --- a/drivers/video/msm/mdss/mdss_debug.c +++ b/drivers/video/msm/mdss/mdss_debug.c @@ -170,6 +170,8 @@ p[2] = 0; pr_debug("p[%d] = %pK:%s\n", i, p, p); cnt = sscanf(p, "%x", &tmp); + if (cnt != 1) + return -EFAULT; reg[i] = tmp; pr_debug("reg[%d] = %x\n", i, (int)reg[i]); }