Commit 9c911962 authored by Dan Carpenter's avatar Dan Carpenter Committed by Thierry Reding

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent d1621803
...@@ -847,6 +847,7 @@ static void s6e8aa0_read_mtp_id(struct s6e8aa0 *ctx) ...@@ -847,6 +847,7 @@ static void s6e8aa0_read_mtp_id(struct s6e8aa0 *ctx)
if (i >= ARRAY_SIZE(s6e8aa0_variants)) { if (i >= ARRAY_SIZE(s6e8aa0_variants)) {
dev_err(ctx->dev, "unsupported display version %d\n", id[1]); dev_err(ctx->dev, "unsupported display version %d\n", id[1]);
ctx->error = -EINVAL; ctx->error = -EINVAL;
return;
} }
ctx->variant = &s6e8aa0_variants[i]; ctx->variant = &s6e8aa0_variants[i];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment