diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2019-01-23 12:37:55 +0300 |
---|---|---|
committer | Liviu Dudau <Liviu.Dudau@arm.com> | 2019-01-30 13:46:17 +0000 |
commit | dcc9d76b6d834d06a317e27fa8242d7e009135ac (patch) | |
tree | 6a8b383cfc79cb060726a59abb48e6f577daac7a /drivers/gpu/drm/arm | |
parent | 874cf192964e05dc6f8103aa8bbcd090a7541312 (diff) | |
download | linux-next-dcc9d76b6d834d06a317e27fa8242d7e009135ac.tar.gz |
drm/komeda: Off by one in komeda_fb_get_pixel_addr()
The > should be >= to avoid an off by one bug.
Fixes: c46c24bb6b11 ("drm/komeda: Add komeda_framebuffer")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Diffstat (limited to 'drivers/gpu/drm/arm')
-rw-r--r-- | drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c b/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c index 4ddd5314ca23..23ee74d42239 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c @@ -144,7 +144,7 @@ komeda_fb_get_pixel_addr(struct komeda_fb *kfb, int x, int y, int plane) const struct drm_gem_cma_object *obj; u32 plane_x, plane_y, cpp, pitch, offset; - if (plane > fb->format->num_planes) { + if (plane >= fb->format->num_planes) { DRM_DEBUG_KMS("Out of max plane num.\n"); return -EINVAL; } |