projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
686b1ce
)
MLK-14718 video: fbdev: mxc: mipi dsi: Check device tree node in probe
author
Liu Ying
<victor.liu@nxp.com>
Thu, 20 Apr 2017 07:27:57 +0000
(15:27 +0800)
committer
Nitin Garg
<nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:22:01 +0000
(15:22 -0500)
For the safe probing's sake, check valid device tree node in probe function.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
drivers/video/fbdev/mxc/mipi_dsi.c
patch
|
blob
|
history
diff --git
a/drivers/video/fbdev/mxc/mipi_dsi.c
b/drivers/video/fbdev/mxc/mipi_dsi.c
index
4e189cd
..
d0f064e
100644
(file)
--- a/
drivers/video/fbdev/mxc/mipi_dsi.c
+++ b/
drivers/video/fbdev/mxc/mipi_dsi.c
@@
-839,6
+839,11
@@
static int mipi_dsi_probe(struct platform_device *pdev)
int mux;
int ret = 0;
+ if (!np) {
+ dev_err(&pdev->dev, "failed to find device tree node\n");
+ return -ENODEV;
+ }
+
mipi_dsi = devm_kzalloc(&pdev->dev, sizeof(*mipi_dsi), GFP_KERNEL);
if (!mipi_dsi)
return -ENOMEM;