diff options
| -rw-r--r-- | drivers/dma-buf/udmabuf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c index 63cc77edd1f3..9edabce0b8ab 100644 --- a/drivers/dma-buf/udmabuf.c +++ b/drivers/dma-buf/udmabuf.c | |||
| @@ -128,7 +128,7 @@ static long udmabuf_create(const struct udmabuf_create_list *head, | |||
| 128 | int seals, ret = -EINVAL; | 128 | int seals, ret = -EINVAL; |
| 129 | u32 i, flags; | 129 | u32 i, flags; |
| 130 | 130 | ||
| 131 | ubuf = kzalloc(sizeof(struct udmabuf), GFP_KERNEL); | 131 | ubuf = kzalloc(sizeof(*ubuf), GFP_KERNEL); |
| 132 | if (!ubuf) | 132 | if (!ubuf) |
| 133 | return -ENOMEM; | 133 | return -ENOMEM; |
| 134 | 134 | ||
| @@ -142,7 +142,7 @@ static long udmabuf_create(const struct udmabuf_create_list *head, | |||
| 142 | if (ubuf->pagecount > pglimit) | 142 | if (ubuf->pagecount > pglimit) |
| 143 | goto err; | 143 | goto err; |
| 144 | } | 144 | } |
| 145 | ubuf->pages = kmalloc_array(ubuf->pagecount, sizeof(struct page *), | 145 | ubuf->pages = kmalloc_array(ubuf->pagecount, sizeof(*ubuf->pages), |
| 146 | GFP_KERNEL); | 146 | GFP_KERNEL); |
| 147 | if (!ubuf->pages) { | 147 | if (!ubuf->pages) { |
| 148 | ret = -ENOMEM; | 148 | ret = -ENOMEM; |
| @@ -211,7 +211,7 @@ static long udmabuf_ioctl_create(struct file *filp, unsigned long arg) | |||
| 211 | struct udmabuf_create_item list; | 211 | struct udmabuf_create_item list; |
| 212 | 212 | ||
| 213 | if (copy_from_user(&create, (void __user *)arg, | 213 | if (copy_from_user(&create, (void __user *)arg, |
| 214 | sizeof(struct udmabuf_create))) | 214 | sizeof(create))) |
| 215 | return -EFAULT; | 215 | return -EFAULT; |
| 216 | 216 | ||
| 217 | head.flags = create.flags; | 217 | head.flags = create.flags; |
