From: Yong Zhi Date: Fri, 1 Feb 2019 17:23:37 +0000 (-0500) Subject: media: ipu3-imgu: Remove dead code for NULL check X-Git-Tag: v5.1-rc1~88^2~143 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=505ecd35182f1ba006ada118c85deca22b88ebcb;p=linux.git media: ipu3-imgu: Remove dead code for NULL check Since ipu3_css_buf_dequeue() never returns NULL, remove the dead code to fix static checker warning: drivers/staging/media/ipu3/ipu3.c:493 imgu_isr_threaded() warn: 'b' is an error pointer or valid Reported-by: Dan Carpenter [Bug report: https://lore.kernel.org/linux-media/20190104122856.GA1169@kadam/] Signed-off-by: Yong Zhi Reviewed-by: Tomasz Figa Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/media/ipu3/ipu3.c b/drivers/staging/media/ipu3/ipu3.c index d521b3afb8b1..839d9398f8e9 100644 --- a/drivers/staging/media/ipu3/ipu3.c +++ b/drivers/staging/media/ipu3/ipu3.c @@ -489,12 +489,11 @@ static irqreturn_t imgu_isr_threaded(int irq, void *imgu_ptr) mutex_unlock(&imgu->lock); } while (PTR_ERR(b) == -EAGAIN); - if (IS_ERR_OR_NULL(b)) { - if (!b || PTR_ERR(b) == -EBUSY) /* All done */ - break; - dev_err(&imgu->pci_dev->dev, - "failed to dequeue buffers (%ld)\n", - PTR_ERR(b)); + if (IS_ERR(b)) { + if (PTR_ERR(b) != -EBUSY) /* All done */ + dev_err(&imgu->pci_dev->dev, + "failed to dequeue buffers (%ld)\n", + PTR_ERR(b)); break; }