From: Sergey Senozhatsky <[email protected]>

That if-statement seems to be unneeded.

Signed-off-by: Sergey Senozhatsky <[email protected]>
---
 drivers/media/common/videobuf2/videobuf2-dma-contig.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

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) {
-- 
2.26.2

Reply via email to