]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
media: atomisp: don't flood dmesg with -EAGAIN return codes
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 21 May 2020 08:04:49 +0000 (10:04 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 11 Jun 2020 15:59:19 +0000 (17:59 +0200)
Using DQBUF on non-blocking mode will return -EAGAIN
if nothing arrives. Printing it has no value, even for debug
purposes. So, only display real return codes.

Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_ioctl.c

index a5e71e5b714efe79dc74148d35232294abfe95c4..6d7d07f55014de82b84a20dbe9fdf290a25508ee 100644 (file)
@@ -1443,7 +1443,8 @@ static int atomisp_dqbuf(struct file *file, void *fh, struct v4l2_buffer *buf)
 
        ret = videobuf_dqbuf(&pipe->capq, buf, file->f_flags & O_NONBLOCK);
        if (ret) {
-               dev_dbg(isp->dev, "<%s: %d\n", __func__, ret);
+               if (ret != -EAGAIN)
+                       dev_dbg(isp->dev, "<%s: %d\n", __func__, ret);
                return ret;
        }
        rt_mutex_lock(&isp->mutex);