Message ID | 1427988653-754-14-git-send-email-l.stach@pengutronix.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/staging/etnaviv/etnaviv_buffer.c b/drivers/staging/etnaviv/etnaviv_buffer.c index 6afb9c702628..729387571537 100644 --- a/drivers/staging/etnaviv/etnaviv_buffer.c +++ b/drivers/staging/etnaviv/etnaviv_buffer.c @@ -30,7 +30,7 @@ static inline void OUT(struct etnaviv_gem_object *buffer, uint32_t data) { u32 *vaddr = (u32 *)buffer->vaddr; - BUG_ON(buffer->offset >= buffer->base.size); + BUG_ON(buffer->offset * sizeof(*vaddr) >= buffer->base.size); vaddr[buffer->offset++] = data; }