Commit 34d84ec4 authored by Markus Elfring's avatar Markus Elfring Committed by Sumit Semwal

dma-buf: Adjust a null pointer check in dma_buf_attach()

The script "checkpatch.pl" pointed information out like the following.

Comparison to NULL could be written "!attach"

Thus adjust this expression.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Reviewed-by: default avatarGustavo Padovan <gustavo.padovan@collabora.com>
Signed-off-by: default avatarSumit Semwal <sumit.semwal@linaro.org>
parent db7942b6
...@@ -559,7 +559,7 @@ struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf, ...@@ -559,7 +559,7 @@ struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf,
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
attach = kzalloc(sizeof(*attach), GFP_KERNEL); attach = kzalloc(sizeof(*attach), GFP_KERNEL);
if (attach == NULL) if (!attach)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
attach->dev = dev; attach->dev = dev;
......
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