diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2012-05-10 02:35:47 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-20 08:03:32 -0400 |
commit | 2356877cb12969cac1572f195d541a2b49d7d78e (patch) | |
tree | 7d44ba0a85c0e37e2585a442bb4997697bb7d528 /drivers | |
parent | a13bba4f35eee67552b0fcfb0790d9a0f5f5fd07 (diff) |
[media] s5p-g2d: Fix NULL pointer warnings in g2d.c file
Fixes the following warnings detected by sparse:
warning: Using plain integer as NULL pointer
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/s5p-g2d/g2d.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/video/s5p-g2d/g2d.c b/drivers/media/video/s5p-g2d/g2d.c index 02605cecfd65..059d93210670 100644 --- a/drivers/media/video/s5p-g2d/g2d.c +++ b/drivers/media/video/s5p-g2d/g2d.c | |||
@@ -546,11 +546,11 @@ static void job_abort(void *prv) | |||
546 | struct g2d_dev *dev = ctx->dev; | 546 | struct g2d_dev *dev = ctx->dev; |
547 | int ret; | 547 | int ret; |
548 | 548 | ||
549 | if (dev->curr == 0) /* No job currently running */ | 549 | if (dev->curr == NULL) /* No job currently running */ |
550 | return; | 550 | return; |
551 | 551 | ||
552 | ret = wait_event_timeout(dev->irq_queue, | 552 | ret = wait_event_timeout(dev->irq_queue, |
553 | dev->curr == 0, | 553 | dev->curr == NULL, |
554 | msecs_to_jiffies(G2D_TIMEOUT)); | 554 | msecs_to_jiffies(G2D_TIMEOUT)); |
555 | } | 555 | } |
556 | 556 | ||
@@ -599,19 +599,19 @@ static irqreturn_t g2d_isr(int irq, void *prv) | |||
599 | g2d_clear_int(dev); | 599 | g2d_clear_int(dev); |
600 | clk_disable(dev->gate); | 600 | clk_disable(dev->gate); |
601 | 601 | ||
602 | BUG_ON(ctx == 0); | 602 | BUG_ON(ctx == NULL); |
603 | 603 | ||
604 | src = v4l2_m2m_src_buf_remove(ctx->m2m_ctx); | 604 | src = v4l2_m2m_src_buf_remove(ctx->m2m_ctx); |
605 | dst = v4l2_m2m_dst_buf_remove(ctx->m2m_ctx); | 605 | dst = v4l2_m2m_dst_buf_remove(ctx->m2m_ctx); |
606 | 606 | ||
607 | BUG_ON(src == 0); | 607 | BUG_ON(src == NULL); |
608 | BUG_ON(dst == 0); | 608 | BUG_ON(dst == NULL); |
609 | 609 | ||
610 | v4l2_m2m_buf_done(src, VB2_BUF_STATE_DONE); | 610 | v4l2_m2m_buf_done(src, VB2_BUF_STATE_DONE); |
611 | v4l2_m2m_buf_done(dst, VB2_BUF_STATE_DONE); | 611 | v4l2_m2m_buf_done(dst, VB2_BUF_STATE_DONE); |
612 | v4l2_m2m_job_finish(dev->m2m_dev, ctx->m2m_ctx); | 612 | v4l2_m2m_job_finish(dev->m2m_dev, ctx->m2m_ctx); |
613 | 613 | ||
614 | dev->curr = 0; | 614 | dev->curr = NULL; |
615 | wake_up(&dev->irq_queue); | 615 | wake_up(&dev->irq_queue); |
616 | return IRQ_HANDLED; | 616 | return IRQ_HANDLED; |
617 | } | 617 | } |