Commit d391bb19 authored by Qianfeng Rong's avatar Qianfeng Rong Committed by Helge Deller
Browse files

fbdev: xenfb: Use vmalloc_array to simplify code



Use vmalloc_array() instead of vmalloc() to simplify the function
xenfb_probe().

Signed-off-by: default avatarQianfeng Rong <rongqianfeng@vivo.com>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent e5f0a698
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -390,7 +390,7 @@ static int xenfb_probe(struct xenbus_device *dev,

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

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