aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLajos Molnar <molnar@ti.com>2010-05-01 09:05:07 -0400
committerPaolo Pisati <paolo.pisati@canonical.com>2012-08-17 04:18:55 -0400
commita85327a255344fb84bfd607148db68103b762edf (patch)
treec429968149796f88d6897bc45c64c8bbef51f0f8
parent441b067a3d7f2236eb035bc7dd0b2cc5433e4ca3 (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>
-rw-r--r--drivers/media/video/tiler/tiler.c10
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,
1237 if (copy_to_user((void __user *)arg, &_b->buf_info, 1237 if (copy_to_user((void __user *)arg, &_b->buf_info,
1238 sizeof(_b->buf_info))) { 1238 sizeof(_b->buf_info))) {
1239 _m_unregister_buf(_b); 1239 _m_unregister_buf(_b);
1240 kfree(_b); return -EFAULT; 1240 return -EFAULT;
1241 } 1241 }
1242 break; 1242 break;
1243 case TILIOC_URBUF: 1243 case TILIOC_URBUF:
@@ -1363,7 +1363,7 @@ s32 tiler_reservex(u32 n, struct tiler_buf_info *b, pid_t pid)
1363 1363
1364 for (i = 0; i < b->num_blocks; i++) { 1364 for (i = 0; i < b->num_blocks; i++) {
1365 /* check for NV12 reservations */ 1365 /* check for NV12 reservations */
1366 if (i < b->num_blocks + 1 && 1366 if (i + 1 < b->num_blocks &&
1367 b->blocks[i].fmt == TILFMT_8BIT && 1367 b->blocks[i].fmt == TILFMT_8BIT &&
1368 b->blocks[i + 1].fmt == TILFMT_16BIT && 1368 b->blocks[i + 1].fmt == TILFMT_16BIT &&
1369 b->blocks[i].dim.area.height == 1369 b->blocks[i].dim.area.height ==
@@ -1426,9 +1426,9 @@ static void __exit tiler_exit(void)
1426 for (i = TILFMT_8BIT; i <= TILFMT_MAX; i++) { 1426 for (i = TILFMT_8BIT; i <= TILFMT_MAX; i++) {
1427 /* remove identical containers (tmm is unique per tcm) */ 1427 /* remove identical containers (tmm is unique per tcm) */
1428 for (j = i + 1; j <= TILFMT_MAX; j++) 1428 for (j = i + 1; j <= TILFMT_MAX; j++)
1429 if (tcm[i] == tcm[j]) { 1429 if (TCM(i) == TCM(j)) {
1430 tcm[j] = NULL; 1430 TCM_SET(j, NULL);
1431 tmm[j] = NULL; 1431 TMM_SET(j, NULL);
1432 } 1432 }
1433 1433
1434 tcm_deinit(TCM(i)); 1434 tcm_deinit(TCM(i));