summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-08-07 14:29:12 +0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-08-08 17:57:14 +0300
commit3354b54f9f7037a1122d3b6009aa9d39829d6843 (patch)
treee10ad409f67d05d07100718a2f6856d6d8ed888e /drivers/staging
parent845b978a871bff3707eee611b32e4be0b9a94dd2 (diff)
downloadlinux-3354b54f9f7037a1122d3b6009aa9d39829d6843.tar.xz
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/staging')
0 files changed, 0 insertions, 0 deletions