summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-05-08 11:54:17 +0300
committerSumit Semwal <sumit.semwal@linaro.org>2017-05-08 18:20:21 +0300
commit34d84ec4881d1343bec8c0848fd946e3073e6612 (patch)
tree41949a9a79aa8b4acc78d3e441b354fecbbd889b /drivers
parentdb7942b6292306abd42d3340fdb57d9d80fcffd9 (diff)
downloadlinux-34d84ec4881d1343bec8c0848fd946e3073e6612.tar.xz
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')
-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;