diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-06-23 09:38:21 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-09-14 11:08:23 -0400 |
commit | 05e1d6060743e34e3a9db65346168dc688f9223e (patch) | |
tree | 2c8ca4e0820392647fe03137be62b91f08def0ac /drivers/video/omap2/dss/rfbi.c | |
parent | 79e4424fbe83a4f2170f3cfa4628d5a34c520d37 (diff) |
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 <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/rfbi.c')
-rw-r--r-- | drivers/video/omap2/dss/rfbi.c | 5 |
1 files changed, 5 insertions, 0 deletions
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) | |||
860 | { | 860 | { |
861 | int r; | 861 | int r; |
862 | 862 | ||
863 | if (dssdev->manager == NULL) { | ||
864 | DSSERR("failed to enable display: no manager\n"); | ||
865 | return -ENODEV; | ||
866 | } | ||
867 | |||
863 | r = rfbi_runtime_get(); | 868 | r = rfbi_runtime_get(); |
864 | if (r) | 869 | if (r) |
865 | return r; | 870 | return r; |