diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-04-09 18:21:12 +0300 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2014-06-05 16:46:39 +0200 |
commit | 9c911962f9d145fd6f8cb3d93ae58486cef14d53 (patch) | |
tree | 85cd46b3aed63550eb406368a71ed05595473530 /drivers/gpu/drm/panel | |
parent | d16218030f7d5195fcf83a424d8e48b89b013a51 (diff) | |
download | op-kernel-dev-9c911962f9d145fd6f8cb3d93ae58486cef14d53.zip op-kernel-dev-9c911962f9d145fd6f8cb3d93ae58486cef14d53.tar.gz |
drm/panel: s6e8aa0: silence array overflow warning
Smatch complains that we are reading beyond the end of the array here:
drivers/gpu/drm/panel/panel-s6e8aa0.c:852 s6e8aa0_read_mtp_id()
warn: buffer overflow 's6e8aa0_variants' 4 <= 4
We set the error code, so it's not harmful but it looks like a return
was intended here so lets add that and silence the warning.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/panel')
-rw-r--r-- | drivers/gpu/drm/panel/panel-s6e8aa0.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/panel/panel-s6e8aa0.c b/drivers/gpu/drm/panel/panel-s6e8aa0.c index 35941d2..06e57a2 100644 --- a/drivers/gpu/drm/panel/panel-s6e8aa0.c +++ b/drivers/gpu/drm/panel/panel-s6e8aa0.c @@ -847,6 +847,7 @@ static void s6e8aa0_read_mtp_id(struct s6e8aa0 *ctx) if (i >= ARRAY_SIZE(s6e8aa0_variants)) { dev_err(ctx->dev, "unsupported display version %d\n", id[1]); ctx->error = -EINVAL; + return; } ctx->variant = &s6e8aa0_variants[i]; |