Commit 2b0a3c40 authored by Fabian Frederick's avatar Fabian Frederick Committed by Dave Airlie

drm: remove unnecessary sizeof(u8)

sizeof(u8) is always 1.
Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent aeb24cc0
...@@ -905,7 +905,7 @@ static int r128_cce_dispatch_write_span(struct drm_device *dev, ...@@ -905,7 +905,7 @@ static int r128_cce_dispatch_write_span(struct drm_device *dev,
if (IS_ERR(buffer)) if (IS_ERR(buffer))
return PTR_ERR(buffer); return PTR_ERR(buffer);
mask_size = depth->n * sizeof(u8); mask_size = depth->n;
if (depth->mask) { if (depth->mask) {
mask = memdup_user(depth->mask, mask_size); mask = memdup_user(depth->mask, mask_size);
if (IS_ERR(mask)) { if (IS_ERR(mask)) {
...@@ -1010,7 +1010,7 @@ static int r128_cce_dispatch_write_pixels(struct drm_device *dev, ...@@ -1010,7 +1010,7 @@ static int r128_cce_dispatch_write_pixels(struct drm_device *dev,
} }
if (depth->mask) { if (depth->mask) {
mask_size = depth->n * sizeof(u8); mask_size = depth->n;
mask = memdup_user(depth->mask, mask_size); mask = memdup_user(depth->mask, mask_size);
if (IS_ERR(mask)) { if (IS_ERR(mask)) {
kfree(x); kfree(x);
......
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