am 57d3b368: am 6a6befc0: am 2754389d: gralloc-qsd8k: make sure that we never try to allocatio 0 bytes

Merge commit '57d3b3680a6d37ffe04e1f24be25b4907bcbaa20'

* commit '57d3b3680a6d37ffe04e1f24be25b4907bcbaa20':
  gralloc-qsd8k: make sure that we never try to allocatio 0 bytes
This commit is contained in:
Dima Zavin 2009-12-10 23:45:13 -08:00 committed by Android Git Automerger
commit 7a3651bf1a

View File

@ -386,6 +386,9 @@ static int gralloc_alloc(alloc_device_t* dev,
size = alignedw * alignedh * bpp;
}
if ((ssize_t)size <= 0)
return -EINVAL;
int err;
if (usage & GRALLOC_USAGE_HW_FB) {
err = gralloc_alloc_framebuffer(dev, size, usage, pHandle);