mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-19 12:24:34 +08:00
media: bdisp: Add missing check for create_workqueue
[ Upstream commit2371adeab7
] Add the check for the return value of the create_workqueue in order to avoid NULL pointer dereference. Fixes:28ffeebbb7
("[media] bdisp: 2D blitter driver using v4l2 mem2mem framework") Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
11c58a0c19
commit
519b084940
@ -1310,6 +1310,8 @@ static int bdisp_probe(struct platform_device *pdev)
|
||||
init_waitqueue_head(&bdisp->irq_queue);
|
||||
INIT_DELAYED_WORK(&bdisp->timeout_work, bdisp_irq_timeout);
|
||||
bdisp->work_queue = create_workqueue(BDISP_NAME);
|
||||
if (!bdisp->work_queue)
|
||||
return -ENOMEM;
|
||||
|
||||
spin_lock_init(&bdisp->slock);
|
||||
mutex_init(&bdisp->lock);
|
||||
|
Loading…
Reference in New Issue
Block a user