diff options
author | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-08-07 07:29:12 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-08-08 10:57:14 -0400 |
commit | 3354b54f9f7037a1122d3b6009aa9d39829d6843 (patch) | |
tree | e10ad409f67d05d07100718a2f6856d6d8ed888e /drivers/media/dvb-frontends | |
parent | 845b978a871bff3707eee611b32e4be0b9a94dd2 (diff) |
media: vivid: shut up warnings due to a non-trivial logic
The vivid driver uses a complex logic to save one kalloc/kfree
allocation. That non-trivial way of allocating data causes
smatch to warn:
drivers/media/platform/vivid/vivid-core.c:869 vivid_create_instance() warn: potentially one past the end of array 'dev->query_dv_timings_qmenu[dev->query_dv_timings_size]'
drivers/media/platform/vivid/vivid-core.c:869 vivid_create_instance() warn: potentially one past the end of array 'dev->query_dv_timings_qmenu[dev->query_dv_timings_size]'
I also needed to read the code several times in order to understand
what it was desired there. It turns that the logic was right,
although confusing to read.
As it is doing allocations on a non-standard way, let's add some
documentation while shutting up the false positive.
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/dvb-frontends')
0 files changed, 0 insertions, 0 deletions