disp: msm: dsi: add null pointer check in dsi_display_dev_remove
This change add display null pointer check in dsi_display_dev_remove. Change-Id: Ib31756c3b22256d19cbcb508f60de4550e3834e1 Signed-off-by: Jinfeng Gu <quic_gjinfeng@quicinc.com>
This commit is contained in:
committed by
Michael Bestas
parent
aeaf1a0d06
commit
388e2df8b9
@@ -5462,6 +5462,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);
|
||||
|
||||
Reference in New Issue
Block a user