Skip to content

Commit d391bb1

Browse files
qianfengronghdeller
authored andcommitted
fbdev: xenfb: Use vmalloc_array to simplify code
Use vmalloc_array() instead of vmalloc() to simplify the function xenfb_probe(). Signed-off-by: Qianfeng Rong <[email protected]> Signed-off-by: Helge Deller <[email protected]>
1 parent e5f0a69 commit d391bb1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/video/fbdev/xen-fbfront.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ static int xenfb_probe(struct xenbus_device *dev,
390390

391391
info->nr_pages = (fb_size + PAGE_SIZE - 1) >> PAGE_SHIFT;
392392

393-
info->gfns = vmalloc(array_size(sizeof(unsigned long), info->nr_pages));
393+
info->gfns = vmalloc_array(info->nr_pages, sizeof(unsigned long));
394394
if (!info->gfns)
395395
goto error_nomem;
396396

0 commit comments

Comments
 (0)