disp: msm: dsi: add null pointer check in dsi_display_dev_remove

This change add display null pointer check in dsi_display_dev_remove.

Mot-CRs-fixed: (CR)
CVE-Fixed: CVE-2024-53024
CRs-Fixed: QC-CR#3902182

Change-Id: Ib31756c3b22256d19cbcb508f60de4550e3834e1
Signed-off-by: Jinfeng Gu <quic_gjinfeng@quicinc.com>
Signed-off-by: Vijeth Kumar K <vijethk@motorola.com>
Reviewed-on: https://gerrit.mot.com/3168319
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Varun Shrivastava <varunshrivastava@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Jinfeng Gu 2024-08-22 15:51:37 +08:00 • committed by Shravanthi P A-SRAVANTI
commit 760ad20d37

View file

@ -6762,6 +6762,10 @@ int dsi_display_dev_remove(struct platform_device *pdev)
}
display = platform_get_drvdata(pdev);
if (!display || !display->panel_node) {
DSI_ERR("invalid display\n");
return -EINVAL;
}
/* decrement ref count */
of_node_put(display->panel_node);