aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/test-drivers/vimc/vimc-lens.c
diff options
context:
space:
mode:
authorLaurent Pinchart <[email protected]>2024-04-24 23:57:34 +0000
committerHans Verkuil <[email protected]>2024-06-26 14:39:34 +0000
commit73a4385c6947df393ffb4bcdf84eef1294057d0c (patch)
tree4c8a83eebe021c642edb8378c4b3444475e29b51 /drivers/media/test-drivers/vimc/vimc-lens.c
parentmedia: vimc: Don't iterate over single pad (diff)
downloadkernel-73a4385c6947df393ffb4bcdf84eef1294057d0c.tar.gz
kernel-73a4385c6947df393ffb4bcdf84eef1294057d0c.zip
media: vimc: Constify vimc_ent_type structures
The vimc_ent_type structure contains static pointers to functions, and no other information that need to be modified after initialization. Make them const to avoid the risk of arbitrary code execution following an overflow that would overwrite the structure's contents. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Shuah Khan <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
Diffstat (limited to 'drivers/media/test-drivers/vimc/vimc-lens.c')
-rw-r--r--drivers/media/test-drivers/vimc/vimc-lens.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/test-drivers/vimc/vimc-lens.c b/drivers/media/test-drivers/vimc/vimc-lens.c
index 3ce7f4b4d2cc..e7d78fa8ccdb 100644
--- a/drivers/media/test-drivers/vimc/vimc-lens.c
+++ b/drivers/media/test-drivers/vimc/vimc-lens.c
@@ -96,7 +96,7 @@ static void vimc_lens_release(struct vimc_ent_device *ved)
kfree(vlens);
}
-struct vimc_ent_type vimc_lens_type = {
+const struct vimc_ent_type vimc_lens_type = {
.add = vimc_lens_add,
.release = vimc_lens_release
};