mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
drm/msm/dsi: Add missing check for alloc_ordered_workqueue
[ Upstream commit 115906ca7b
]
Add check for the return value of alloc_ordered_workqueue as it may return
NULL pointer and cause NULL pointer dereference.
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/517646/
Link: https://lore.kernel.org/r/20230110021651.12770-1-jiasheng@iscas.ac.cn
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
cb109cedbb
commit
3e18f157fa
1 changed files with 3 additions and 0 deletions
|
@ -1769,6 +1769,9 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi)
|
|||
|
||||
/* setup workqueue */
|
||||
msm_host->workqueue = alloc_ordered_workqueue("dsi_drm_work", 0);
|
||||
if (!msm_host->workqueue)
|
||||
return -ENOMEM;
|
||||
|
||||
INIT_WORK(&msm_host->err_work, dsi_err_worker);
|
||||
INIT_WORK(&msm_host->hpd_work, dsi_hpd_worker);
|
||||
|
||||
|
|
Loading…
Reference in a new issue