]> git.baikalelectronics.ru Git - kernel.git/commit
media: cx25821: Fix a bug when reallocating some dma memory
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 16 Jan 2021 21:21:46 +0000 (22:21 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 27 Jan 2021 12:44:58 +0000 (13:44 +0100)
commit645f4459c989bc7c171403602c59ad4739d06539
tree90d58a74eee04a137de3ad68e7ac8e84925585d1
parent8911307abc757ffaab8f30128b64d03309a49cd7
media: cx25821: Fix a bug when reallocating some dma memory

This function looks like a realloc.

However, if 'risc->cpu != NULL', the memory will be freed, but never
reallocated with the bigger 'size'.
Explicitly set 'risc->cpu' to NULL, so that the reallocation is
correctly performed a few lines below.

[hverkuil: NULL != risc->cpu -> risc->cpu]

Fixes: 738fb33ed878 ("[media] cx25821: remove bogus btcx_risc dependency)
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/pci/cx25821/cx25821-core.c