summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev
diff options
context:
space:
mode:
authorCh Ganesh Kumar <chganesh@codeaurora.org>2018-08-20 13:35:37 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2018-09-03 03:20:44 -0700
commit6bd5371814f3742ea951047bd2cdb477d4923dde (patch)
tree1f57621b43e3e00bcc5703f694add148f74caba6 /drivers/video/fbdev
parentf09b84f8eaa7a14577888c1dc9a298301d3c839c (diff)
msm: mdss: Fix Gamma LUT bounds condition
Validate the Gamma correction feature with all bound condition. This change corrects the Gamma LUT block bound condition. Change-Id: I3fc460b6a6e2e76f7c07b649e1db1e01ce208476 Signed-off-by: Ch Ganesh Kumar <chganesh@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev')
-rw-r--r--drivers/video/fbdev/msm/mdss_compat_utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/fbdev/msm/mdss_compat_utils.c b/drivers/video/fbdev/msm/mdss_compat_utils.c
index 8c28fbf8fbc2..6454ce7e57df 100644
--- a/drivers/video/fbdev/msm/mdss_compat_utils.c
+++ b/drivers/video/fbdev/msm/mdss_compat_utils.c
@@ -1312,10 +1312,10 @@ static int __from_user_pgc_lut_data_legacy(
return -EFAULT;
if (num_r_stages > GC_LUT_SEGMENTS || num_b_stages > GC_LUT_SEGMENTS
- || num_r_stages > GC_LUT_SEGMENTS || !num_r_stages || !num_b_stages
+ || num_g_stages > GC_LUT_SEGMENTS || !num_r_stages || !num_b_stages
|| !num_g_stages) {
pr_err("invalid number of stages r_stages %d b_stages %d g_stages %d\n",
- num_r_stages, num_b_stages, num_r_stages);
+ num_r_stages, num_b_stages, num_g_stages);
return -EFAULT;
}