From 05e1d6060743e34e3a9db65346168dc688f9223e Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Thu, 23 Jun 2011 16:38:21 +0300 Subject: OMAP: DSS2: check for manager when enabling display None of the DSS interface drivers check if an overlay manager is connected to the display when the display is being enabled. This leads to null pointer crash if the display has no manager. This patch checks for the manager and returns an error if it is null. Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/dss/rfbi.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/video/omap2/dss/rfbi.c') diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c index 39f4c597026a..1bb8ce11f6bc 100644 --- a/drivers/video/omap2/dss/rfbi.c +++ b/drivers/video/omap2/dss/rfbi.c @@ -860,6 +860,11 @@ int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev) { int r; + if (dssdev->manager == NULL) { + DSSERR("failed to enable display: no manager\n"); + return -ENODEV; + } + r = rfbi_runtime_get(); if (r) return r; -- cgit v1.2.1