[PATCH] staging: media: atomisp: use sizeof(*pointer) in vzalloc
From: Prajval Chaudhary
Date: Sat Jul 18 2026 - 13:42:40 EST
Fix checkpatch style warnings by replacing explicit 'sizeof(struct ...)'
types with 'sizeof(*pointer)' inside vzalloc allocations. This aligns
the code with modern kernel coding style standards and ensures the
allocations automatically adapt if the pointer's structure type changes
in the future.
Signed-off-by: Prajval Chaudhary <prajvalchaudhari733@xxxxxxxxx>
---
drivers/staging/media/atomisp/pci/atomisp_compat_css20.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c b/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c
index 0ee52637ea30..ea49ebe2da5c 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c
@@ -2873,7 +2873,7 @@ int atomisp_css_get_ctc_table(struct atomisp_sub_device *asd,
return -EINVAL;
}
- tab = vzalloc(sizeof(struct ia_css_ctc_table));
+ tab = vzalloc(sizeof(*tab));
if (!tab)
return -ENOMEM;
@@ -2901,7 +2901,7 @@ int atomisp_css_get_gamma_table(struct atomisp_sub_device *asd,
return -EINVAL;
}
- tab = vzalloc(sizeof(struct ia_css_gamma_table));
+ tab = vzalloc(sizeof(*tab));
if (!tab)
return -ENOMEM;
--
2.34.1