DSS2: Verify that overlay paddr != 0
authorTomi Valkeinen <tomi.valkeinen@nokia.com>
Thu, 2 Apr 2009 11:21:12 +0000 (14:21 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Fri, 1 May 2009 16:44:59 +0000 (19:44 +0300)
drivers/video/omap2/dss/dispc.c
drivers/video/omap2/dss/overlay.c

index 6cea545..2480a03 100644 (file)
@@ -1301,6 +1301,9 @@ static int _dispc_setup_plane(enum omap_plane plane,
        s32 row_inc;
        s32 pix_inc;
 
+       if (paddr == 0)
+               return -EINVAL;
+
        if (plane == OMAP_DSS_GFX) {
                if (width != out_width || height != out_height)
                        return -EINVAL;
index 968edbe..9209acf 100644 (file)
@@ -331,6 +331,9 @@ static int dss_ovl_set_overlay_info(struct omap_overlay *ovl,
        int r;
        struct omap_overlay_info old_info;
 
+       if (info->paddr == 0)
+               return -EINVAL;
+
        old_info = ovl->info;
        ovl->info = *info;