On Tue Aug 12 11:53:03 2025 +0800, Qianfeng Rong wrote:
> Remove array_size() calls and replace vmalloc() with vmalloc_array() to
> simplify the code.
> 
> Signed-off-by: Qianfeng Rong <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>

Patch committed.

Thanks,
Hans Verkuil

 drivers/media/pci/pt1/pt1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

---

diff --git a/drivers/media/pci/pt1/pt1.c b/drivers/media/pci/pt1/pt1.c
index 121a4a92ea10..1ced093583ac 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;
 
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to