Skip to content
Commit 7060ab1c authored by José Expósito's avatar José Expósito Committed by Pu Lehui
Browse files

drm/msm/dsi: invalid parameter check in msm_dsi_phy_enable

stable inclusion
from stable-v4.19.228
commit ca63eeb70fcb53c42e1fe54e1735a54d8e7759fd
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IA72C3
CVE: CVE-2022-48756

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ca63eeb70fcb



--------------------------------

commit 5e761a22 upstream.

The function performs a check on the "phy" input parameter, however, it
is used before the check.

Initialize the "dev" variable after the sanity check to avoid a possible
NULL pointer dereference.

Fixes: 5c829028 ("drm/msm/dsi: Split PHY drivers to separate files")
Addresses-Coverity-ID: 1493860 ("Null pointer dereference")
Signed-off-by: default avatarJosé Expósito <jose.exposito89@gmail.com>
Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20220116181844.7400-1-jose.exposito89@gmail.com


Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarPu Lehui <pulehui@huawei.com>
parent a691480d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment