From: SF Markus Elfring <elfring@users.sourceforge.net>
To: dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org,
linux-media@vger.kernel.org,
Gustavo Padovan <gustavo@padovan.org>,
Sumit Semwal <sumit.semwal@linaro.org>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 3/4] dma-buf: Adjust a null pointer check in dma_buf_attach()
Date: Mon, 8 May 2017 11:13:16 +0200 [thread overview]
Message-ID: <1deb58e7-7eac-55d6-235a-baf72f392371@users.sourceforge.net> (raw)
In-Reply-To: <3d972fa2-787a-d1f2-ff86-5c05494e00d3@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 8 May 2017 10:54:17 +0200
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>
---
drivers/dma-buf/dma-buf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
--
2.12.2
next prev parent reply other threads:[~2017-05-08 9:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-08 9:10 [PATCH 0/4] DMA-buf: Fine-tuning for four function implementations SF Markus Elfring
2017-05-08 9:11 ` [PATCH 1/4] dma-buf: Combine two function calls into one in dma_buf_debug_show() SF Markus Elfring
2017-05-08 14:31 ` Gustavo Padovan
2017-05-08 9:12 ` [PATCH 2/4] dma-buf: Improve a size determination in dma_buf_attach() SF Markus Elfring
2017-05-08 14:31 ` Gustavo Padovan
2017-05-08 9:13 ` SF Markus Elfring [this message]
2017-05-08 14:32 ` [PATCH 3/4] dma-buf: Adjust a null pointer check " Gustavo Padovan
2017-05-08 9:14 ` [PATCH 4/4] dma-buf: Use seq_putc() in two functions SF Markus Elfring
2017-05-08 14:33 ` Gustavo Padovan
2017-05-09 4:18 ` [PATCH 0/4] DMA-buf: Fine-tuning for four function implementations Sumit Semwal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1deb58e7-7eac-55d6-235a-baf72f392371@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavo@padovan.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=sumit.semwal@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).