diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/omap/omap_vout.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/media/platform/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c index a2cc634eb42e..e8cac9e55bc9 100644 --- a/drivers/media/platform/omap/omap_vout.c +++ b/drivers/media/platform/omap/omap_vout.c | |||
@@ -2184,14 +2184,23 @@ static int __init omap_vout_probe(struct platform_device *pdev) | |||
2184 | struct omap_dss_device *def_display; | 2184 | struct omap_dss_device *def_display; |
2185 | struct omap2video_device *vid_dev = NULL; | 2185 | struct omap2video_device *vid_dev = NULL; |
2186 | 2186 | ||
2187 | ret = omapdss_compat_init(); | ||
2188 | if (ret) { | ||
2189 | dev_err(&pdev->dev, "failed to init dss\n"); | ||
2190 | return ret; | ||
2191 | } | ||
2192 | |||
2187 | if (pdev->num_resources == 0) { | 2193 | if (pdev->num_resources == 0) { |
2188 | dev_err(&pdev->dev, "probed for an unknown device\n"); | 2194 | dev_err(&pdev->dev, "probed for an unknown device\n"); |
2189 | return -ENODEV; | 2195 | ret = -ENODEV; |
2196 | goto err_dss_init; | ||
2190 | } | 2197 | } |
2191 | 2198 | ||
2192 | vid_dev = kzalloc(sizeof(struct omap2video_device), GFP_KERNEL); | 2199 | vid_dev = kzalloc(sizeof(struct omap2video_device), GFP_KERNEL); |
2193 | if (vid_dev == NULL) | 2200 | if (vid_dev == NULL) { |
2194 | return -ENOMEM; | 2201 | ret = -ENOMEM; |
2202 | goto err_dss_init; | ||
2203 | } | ||
2195 | 2204 | ||
2196 | vid_dev->num_displays = 0; | 2205 | vid_dev->num_displays = 0; |
2197 | for_each_dss_dev(dssdev) { | 2206 | for_each_dss_dev(dssdev) { |
@@ -2286,6 +2295,8 @@ probe_err1: | |||
2286 | } | 2295 | } |
2287 | probe_err0: | 2296 | probe_err0: |
2288 | kfree(vid_dev); | 2297 | kfree(vid_dev); |
2298 | err_dss_init: | ||
2299 | omapdss_compat_uninit(); | ||
2289 | return ret; | 2300 | return ret; |
2290 | } | 2301 | } |
2291 | 2302 | ||