vmwgfx: strange loop in vmw_kms_update_layout_ioctl()
Xi Wang
xi.wang at gmail.com
Thu Nov 24 09:23:04 PST 2011
Hi,
I came across this code snippet at vmwgfx_kms.c:2000. The loop variable i is never used and rects is checked again and again. Should it be something like rects[i].x instead of rects->x? Thanks.
for (i = 0; i < arg->num_outputs; ++i) {
if (rects->x < 0 ||
rects->y < 0 ||
rects->x + rects->w > mode_config->max_width ||
rects->y + rects->h > mode_config->max_height) {
DRM_ERROR("Invalid GUI layout.\n");
ret = -EINVAL;
goto out_free;
}
}
- xi
More information about the dri-devel
mailing list