]> git.proxmox.com Git - mirror_ubuntu-focal-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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 20 Jan 2021 13:25:42 +0000 (14:25 +0100)
commit01602cd0522c3cf64983cd7cb27ff7202c456288
treed512de45a4067fd82287dd55d350253576fa61ac
parent61cb5e123d716953ae906e562d7480ba54548d31
media: tm6000: Fix sizeof() mismatches

BugLink: https://bugs.launchpad.net/bugs/1910822
[ Upstream commit a08ad6339e0441ca12533969ed94a87e3655426e ]

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: 16427faf2867 ("[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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/media/usb/tm6000/tm6000-video.c