diff options
author | Ricardo Ribalda <ribalda@chromium.org> | 2024-05-27 21:08:58 +0000 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2024-05-31 13:51:16 +0200 |
commit | 364ae46413f67f97e4611b050d7d53079dbb9dba (patch) | |
tree | 59b23becf768fe65bac6dfb2e214bef054848d8f /init | |
parent | b657179a11d9834df16b3bc2015f2931d20de528 (diff) |
media: siano: Use flex arrays for sms_firmware
Replace old style single array member, with flex array.
The struct is allocated, but it seems like there was an over allocation
error:
fw_buf = kmalloc(ALIGN(fw->size + sizeof(struct sms_firmware),
SMS_ALLOC_ALIGNMENT), GFP_KERNEL | coredev->gfp_buf_flags);
This change fixes this cocci warning:
drivers/media/common/siano/smscoreapi.h:669:6-13: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays)
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions