diff options
author | Lajos Molnar <molnar@ti.com> | 2011-04-07 08:41:03 +0100 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-04-07 08:41:03 +0100 |
commit | 46cd0bb0c13328ee7fe711f9b143ebf9568543e5 (patch) | |
tree | 98af6d49e574941b86d8ce27e31107d2642f4901 /drivers/media/video/tiler | |
parent | 98b7248f1c210609aad652dbd60f64dcd143486f (diff) |
TILER: Fix klocwork defects in tiler_reservex() and tiler_exit()
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
Diffstat (limited to 'drivers/media/video/tiler')
-rw-r--r-- | drivers/media/video/tiler/tiler.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/video/tiler/tiler.c b/drivers/media/video/tiler/tiler.c index 9b1d2e8874e..f0cf1963301 100644 --- a/drivers/media/video/tiler/tiler.c +++ b/drivers/media/video/tiler/tiler.c @@ -1237,7 +1237,7 @@ static s32 tiler_ioctl(struct inode *ip, struct file *filp, u32 cmd, if (copy_to_user((void __user *)arg, &_b->buf_info, sizeof(_b->buf_info))) { _m_unregister_buf(_b); - kfree(_b); return -EFAULT; + return -EFAULT; } break; case TILIOC_URBUF: @@ -1363,7 +1363,7 @@ s32 tiler_reservex(u32 n, struct tiler_buf_info *b, pid_t pid) for (i = 0; i < b->num_blocks; i++) { /* check for NV12 reservations */ - if (i < b->num_blocks + 1 && + if (i + 1 < b->num_blocks && b->blocks[i].fmt == TILFMT_8BIT && b->blocks[i + 1].fmt == TILFMT_16BIT && b->blocks[i].dim.area.height == @@ -1426,9 +1426,9 @@ static void __exit tiler_exit(void) for (i = TILFMT_8BIT; i <= TILFMT_MAX; i++) { /* remove identical containers (tmm is unique per tcm) */ for (j = i + 1; j <= TILFMT_MAX; j++) - if (tcm[i] == tcm[j]) { - tcm[j] = NULL; - tmm[j] = NULL; + if (TCM(i) == TCM(j)) { + TCM_SET(j, NULL); + TMM_SET(j, NULL); } tcm_deinit(TCM(i)); |