diff mbox series

[v6,13/14] videobuf2: remove redundant if-statement

Message ID 20200514160153.3646-14-sergey.senozhatsky@gmail.com (mailing list archive)
State New, archived
Headers show
Series Implement V4L2_BUF_FLAG_NO_CACHE_* flags | expand

Commit Message

Sergey Senozhatsky May 14, 2020, 4:01 p.m. UTC
From: Sergey Senozhatsky <senozhatsky@chromium.org>

That if-statement seems to be unneeded.

Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
---
 drivers/media/common/videobuf2/videobuf2-dma-contig.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/media/common/videobuf2/videobuf2-dma-contig.c b/drivers/media/common/videobuf2/videobuf2-dma-contig.c
index 5a3e1c3b556f..6ac0822e1bf0 100644
--- a/drivers/media/common/videobuf2/videobuf2-dma-contig.c
+++ b/drivers/media/common/videobuf2/videobuf2-dma-contig.c
@@ -152,8 +152,7 @@  static void *vb2_dc_alloc(struct device *dev, unsigned long attrs,
 	if (!buf)
 		return ERR_PTR(-ENOMEM);
 
-	if (attrs)
-		buf->attrs = attrs;
+	buf->attrs = attrs;
 	buf->cookie = dma_alloc_attrs(dev, size, &buf->dma_addr,
 					GFP_KERNEL | gfp_flags, buf->attrs);
 	if (!buf->cookie) {