blob: 76b8c736306f436aba35ae6d86d2822c5dc14b3c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
From 360a55ddd309e3a45b227a4a905ae7120dd16169 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 2 Apr 2009 14:21:12 +0300
Subject: [PATCH] DSS2: Verify that overlay paddr != 0
---
drivers/video/omap2/dss/dispc.c | 3 +++
drivers/video/omap2/dss/overlay.c | 3 +++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 6cea545..2480a03 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -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;
diff --git a/drivers/video/omap2/dss/overlay.c b/drivers/video/omap2/dss/overlay.c
index 968edbe..9209acf 100644
--- a/drivers/video/omap2/dss/overlay.c
+++ b/drivers/video/omap2/dss/overlay.c
@@ -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;
--
1.5.6.5
|