]> git.baikalelectronics.ru Git - kernel.git/commit
media: tm6000: Fix sizeof() mismatches
authorColin Ian King <colin.king@canonical.com>
Thu, 8 Oct 2020 21:12:23 +0000 (23:12 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 16 Nov 2020 09:31:09 +0000 (10:31 +0100)
commitaf495509b4af5c92a97f20edfe7725196b0f4f1e
treef8713194601742b578a503cb325dba52660950d9
parent274388bee631eb9a5fb1adb2fcef3ea01612b083
media: tm6000: Fix sizeof() mismatches

The are two instances of sizeof() being used incorrectly. The
sizeof(void *) is incorrect because urb_buffer is a char ** pointer,
fix this by using sizeof(*dev->urb_buffer).  The sizeof(dma_addr_t *)
is incorrect, it should be sizeof(*dev->urb_dma), which is a dma_addr_t
and not a dma_addr_t *.  This errors did not cause any issues because
it just so happens the sizes are the same.

Addresses-Coverity: ("Sizeof not portable (SIZEOF_MISMATCH)")

Fixes: 56692974617c ("[media] tm6000: Add parameter to keep urb bufs allocated")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/usb/tm6000/tm6000-video.c