mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 03:45:24 -04:00
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:
parent
addbc02b3a
commit
c8f3df8ea4
1 changed files with 4 additions and 0 deletions
|
|
@ -6131,6 +6131,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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue