summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@kernel.org>2022-05-13 11:15:18 +0300
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-05-13 12:02:20 +0300
commitfa1451374ebf2474660932bf2c34fae395c69a25 (patch)
tree577a3e916b0d92cdaeb7f0703c003980327735be /drivers/media
parent7b602069cdddb59669cef7935c5ab06591945bfe (diff)
downloadlinux-fa1451374ebf2474660932bf2c34fae395c69a25.tar.xz
media: atomisp: don't pass a pointer to a local variable
As warned by gcc 12.1: drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c: In function 'ia_css_rmgr_acq_vbuf': drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c:275:33: error: storing the address of local variable 'h' in '*handle' [-Werror=dangling-pointer=] 275 | *handle = &h; | ~~~~~~~~^~~~ drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c:257:40: note: 'h' declared here 257 | struct ia_css_rmgr_vbuf_handle h; | ^ drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c:257:40: note: 'handle' declared here cc1: all warnings being treated as errors The logic uses a temporary struct to update the handler, but, instead of copying the value to the pointer sent by the caller, it replaces it with the content with a local variable. That's wrong, and may lead the caller to use a weird value. Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media')
0 files changed, 0 insertions, 0 deletions