From: Qianfeng Rong Date: Tue, 12 Aug 2025 03:53:03 +0000 (+0800) Subject: media: pt1: use vmalloc_array to simplify code X-Git-Tag: v6.19-rc1~159^2~244 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1772b7f8045b703befc947da02b3c2620dea64fe;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Hans Verkuil --- diff --git a/drivers/media/pci/pt1/pt1.c b/drivers/media/pci/pt1/pt1.c index 121a4a92ea105..1ced093583ac8 100644 --- a/drivers/media/pci/pt1/pt1.c +++ b/drivers/media/pci/pt1/pt1.c @@ -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;