Commit 33f35429 authored by Gerd Hoffmann's avatar Gerd Hoffmann
parent 7b26e4e2
...@@ -128,7 +128,7 @@ static long udmabuf_create(const struct udmabuf_create_list *head, ...@@ -128,7 +128,7 @@ static long udmabuf_create(const struct udmabuf_create_list *head,
int seals, ret = -EINVAL; int seals, ret = -EINVAL;
u32 i, flags; u32 i, flags;
ubuf = kzalloc(sizeof(struct udmabuf), GFP_KERNEL); ubuf = kzalloc(sizeof(*ubuf), GFP_KERNEL);
if (!ubuf) if (!ubuf)
return -ENOMEM; return -ENOMEM;
...@@ -142,7 +142,7 @@ static long udmabuf_create(const struct udmabuf_create_list *head, ...@@ -142,7 +142,7 @@ static long udmabuf_create(const struct udmabuf_create_list *head,
if (ubuf->pagecount > pglimit) if (ubuf->pagecount > pglimit)
goto err; goto err;
} }
ubuf->pages = kmalloc_array(ubuf->pagecount, sizeof(struct page *), ubuf->pages = kmalloc_array(ubuf->pagecount, sizeof(*ubuf->pages),
GFP_KERNEL); GFP_KERNEL);
if (!ubuf->pages) { if (!ubuf->pages) {
ret = -ENOMEM; ret = -ENOMEM;
...@@ -211,7 +211,7 @@ static long udmabuf_ioctl_create(struct file *filp, unsigned long arg) ...@@ -211,7 +211,7 @@ static long udmabuf_ioctl_create(struct file *filp, unsigned long arg)
struct udmabuf_create_item list; struct udmabuf_create_item list;
if (copy_from_user(&create, (void __user *)arg, if (copy_from_user(&create, (void __user *)arg,
sizeof(struct udmabuf_create))) sizeof(create)))
return -EFAULT; return -EFAULT;
head.flags = create.flags; head.flags = create.flags;
......
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