summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLajos Molnar <molnar@ti.com>2011-06-15 17:04:48 -0500
committerRebecca Schultz Zavin <rebecca@android.com>2011-07-11 14:39:57 -0700
commit00b92b64cbb5b9eb90edce3e65ccac07a4bc2e82 (patch)
tree2f8ab2a7b7585a95af0c371b1775a6d6317b1ca4
parent7776acedfb5c5989b0937398c5eb2f45ed6379f1 (diff)
downloadomap-linux-omap-mm-3.0.tar.gz
OMAP:TILER: Make tiler_alloc_block_area fail gracefully.linux-omap-mm-3.0
tiler_alloc_block_area should return NULL if called before TILER was initialized, as it may be called from other modules that are not aware of the TILER initialization sequence. Change-Id: I39b1e6e1896b850a144daeb2376af71897532ffb Signed-off-by: Lajos Molnar <molnar@ti.com>
-rw-r--r--drivers/media/video/tiler/tiler-main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/video/tiler/tiler-main.c b/drivers/media/video/tiler/tiler-main.c
index 41336c2e5d16..17ce99055e96 100644
--- a/drivers/media/video/tiler/tiler-main.c
+++ b/drivers/media/video/tiler/tiler-main.c
@@ -1432,6 +1432,10 @@ tiler_blk_handle tiler_alloc_block_area(enum tiler_fmt fmt, u32 width,
struct mem_info *mi;
*ssptr = 0;
+ /* if tiler is not initialized fail gracefully */
+ if (!tilerdev_class)
+ return NULL;
+
mi = alloc_block_area(fmt, width, height, 0, 0, __get_pi(0, true));
if (IS_ERR_OR_NULL(mi))