diff options
author | Lajos Molnar <molnar@ti.com> | 2011-06-15 17:04:48 -0500 |
---|---|---|
committer | Rebecca Schultz Zavin <rebecca@android.com> | 2011-07-11 14:39:57 -0700 |
commit | 00b92b64cbb5b9eb90edce3e65ccac07a4bc2e82 (patch) | |
tree | 2f8ab2a7b7585a95af0c371b1775a6d6317b1ca4 | |
parent | 7776acedfb5c5989b0937398c5eb2f45ed6379f1 (diff) | |
download | omap-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.c | 4 |
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)) |