mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
media: pt1: use vmalloc_array to simplify code
Remove array_size() calls and replace vmalloc() with vmalloc_array() to simplify the code. Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
committed by
Hans Verkuil
parent
e4b21577b4
commit
1772b7f804
@@ -639,7 +639,7 @@ static int pt1_init_tables(struct pt1 *pt1)
|
||||
if (!pt1_nr_tables)
|
||||
return 0;
|
||||
|
||||
tables = vmalloc(array_size(pt1_nr_tables, sizeof(struct pt1_table)));
|
||||
tables = vmalloc_array(pt1_nr_tables, sizeof(struct pt1_table));
|
||||
if (tables == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user