drm: omapdrm: panel-dpi: Remove unneeded check for OF node
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 4 Aug 2017 22:43:48 +0000 (01:43 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 15 Aug 2017 12:18:25 +0000 (15:18 +0300)
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>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/gpu/drm/omapdrm/displays/panel-dpi.c

index 6468a765f3d17dc5f4eeb83d54d8c52494105874..e065f7e10cca50579f55845d5b1bac99e85e9f77 100644 (file)
@@ -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;