summaryrefslogtreecommitdiff
path: root/drivers/dma-buf
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-05-08 10:54:17 +0200
committerSumit Semwal <sumit.semwal@linaro.org>2017-05-08 20:50:21 +0530
commit34d84ec4881d1343bec8c0848fd946e3073e6612 (patch)
tree41949a9a79aa8b4acc78d3e441b354fecbbd889b /drivers/dma-buf
parentdb7942b6292306abd42d3340fdb57d9d80fcffd9 (diff)
downloadlinux-next-34d84ec4881d1343bec8c0848fd946e3073e6612.tar.gz
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: Markus Elfring <elfring@users.sourceforge.net> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Diffstat (limited to 'drivers/dma-buf')
-rw-r--r--drivers/dma-buf/dma-buf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index 9887d72cf804..4a038dcf5361 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -559,7 +559,7 @@ struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf,
return ERR_PTR(-EINVAL);
attach = kzalloc(sizeof(*attach), GFP_KERNEL);
- if (attach == NULL)
+ if (!attach)
return ERR_PTR(-ENOMEM);
attach->dev = dev;