Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 23d84ed9 authored by Vincent Penquerc'h's avatar Vincent Penquerc'h Committed by Greg Kroah-Hartman
Browse files

staging: omapdrm: fix allocation size for page addresses array

parent c8f2f0db
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -246,7 +246,7 @@ static int omap_gem_attach_pages(struct drm_gem_object *obj)
	 * DSS, GPU, etc. are not cache coherent:
	 */
	if (omap_obj->flags & (OMAP_BO_WC|OMAP_BO_UNCACHED)) {
		addrs = kmalloc(npages * sizeof(addrs), GFP_KERNEL);
		addrs = kmalloc(npages * sizeof(*addrs), GFP_KERNEL);
		if (!addrs) {
			ret = -ENOMEM;
			goto free_pages;
@@ -257,7 +257,7 @@ static int omap_gem_attach_pages(struct drm_gem_object *obj)
					0, PAGE_SIZE, DMA_BIDIRECTIONAL);
		}
	} else {
		addrs = kzalloc(npages * sizeof(addrs), GFP_KERNEL);
		addrs = kzalloc(npages * sizeof(*addrs), GFP_KERNEL);
		if (!addrs) {
			ret = -ENOMEM;
			goto free_pages;