mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 10:04:04 +02:00
media: chips-media: wave5: fix a potential memory leak in wave5_vdi_init()
Add wave5_vdi_free_dma_memory() in the error path of
wave5_vdi_init() to prevent a potential memory leak.
Fixes: 45d1a2b932 ("media: chips-media: wave5: Add vpuapi layer")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
0e2c4117c3
commit
95bd174a45
|
|
@ -49,6 +49,7 @@ int wave5_vdi_init(struct device *dev)
|
|||
|
||||
if (!PRODUCT_CODE_W_SERIES(vpu_dev->product_code)) {
|
||||
WARN_ONCE(1, "unsupported product code: 0x%x\n", vpu_dev->product_code);
|
||||
wave5_vdi_free_dma_memory(vpu_dev, &vpu_dev->common_mem);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user