Patchwork [v3,04/35] drm: omapdrm: panel-dpi: Remove unneeded check for OF node

login
register
mail settings
Submitter Laurent Pinchart
Date Aug. 4, 2017, 10:43 p.m.
Message ID <20170804224419.30758-5-laurent.pinchart@ideasonboard.com>
Download mbox | patch
Permalink /patch/9882213/
State New
Headers show

Comments

Laurent Pinchart - Aug. 4, 2017, 10:43 p.m.
As non-DT booting is no longer supported, the only way to instantiate
the device is through an OF node, which is guaranteed to be present.
Remove the unneeded check.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/gpu/drm/omapdrm/displays/panel-dpi.c | 3 +++
 1 file changed, 3 insertions(+)

Patch

diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c
index 6468a765f3d1..e065f7e10cca 100644
--- a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c
+++ b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c
@@ -231,6 +231,9 @@  static int panel_dpi_probe(struct platform_device *pdev)
 	struct omap_dss_device *dssdev;
 	int r;
 
+	if (!pdev->dev.of_node)
+		return -ENODEV;
+
 	ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL);
 	if (ddata == NULL)
 		return -ENOMEM;