Commit 2356877c authored by Sachin Kamat's avatar Sachin Kamat Committed by Mauro Carvalho Chehab

[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: default avatarSachin Kamat <sachin.kamat@linaro.org>
Acked-by: default avatarKamil Debski <k.debski@samsung.com>
Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent a13bba4f
...@@ -546,11 +546,11 @@ static void job_abort(void *prv) ...@@ -546,11 +546,11 @@ static void job_abort(void *prv)
struct g2d_dev *dev = ctx->dev; struct g2d_dev *dev = ctx->dev;
int ret; int ret;
if (dev->curr == 0) /* No job currently running */ if (dev->curr == NULL) /* No job currently running */
return; return;
ret = wait_event_timeout(dev->irq_queue, ret = wait_event_timeout(dev->irq_queue,
dev->curr == 0, dev->curr == NULL,
msecs_to_jiffies(G2D_TIMEOUT)); msecs_to_jiffies(G2D_TIMEOUT));
} }
...@@ -599,19 +599,19 @@ static irqreturn_t g2d_isr(int irq, void *prv) ...@@ -599,19 +599,19 @@ static irqreturn_t g2d_isr(int irq, void *prv)
g2d_clear_int(dev); g2d_clear_int(dev);
clk_disable(dev->gate); clk_disable(dev->gate);
BUG_ON(ctx == 0); BUG_ON(ctx == NULL);
src = v4l2_m2m_src_buf_remove(ctx->m2m_ctx); src = v4l2_m2m_src_buf_remove(ctx->m2m_ctx);
dst = v4l2_m2m_dst_buf_remove(ctx->m2m_ctx); dst = v4l2_m2m_dst_buf_remove(ctx->m2m_ctx);
BUG_ON(src == 0); BUG_ON(src == NULL);
BUG_ON(dst == 0); BUG_ON(dst == NULL);
v4l2_m2m_buf_done(src, VB2_BUF_STATE_DONE); v4l2_m2m_buf_done(src, VB2_BUF_STATE_DONE);
v4l2_m2m_buf_done(dst, VB2_BUF_STATE_DONE); v4l2_m2m_buf_done(dst, VB2_BUF_STATE_DONE);
v4l2_m2m_job_finish(dev->m2m_dev, ctx->m2m_ctx); v4l2_m2m_job_finish(dev->m2m_dev, ctx->m2m_ctx);
dev->curr = 0; dev->curr = NULL;
wake_up(&dev->irq_queue); wake_up(&dev->irq_queue);
return IRQ_HANDLED; return IRQ_HANDLED;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment