From: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de,
pmeerw@pmeerw.net, gregkh@linuxfoundation.org,
ciorneiioana@gmail.com, cristina.moraru09@gmail.com,
dan.carpenter@oracle.com, josselin.costanzi@mobile-devices.fr,
bhaktipriya96@gmail.com
Cc: linux-iio@vger.kernel.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] Staging: iio: accel: Fixed NULL comparison style
Date: Sun, 13 Dec 2015 12:54:27 +0300 [thread overview]
Message-ID: <20151213095427.GA6159@Karyakshetra> (raw)
This patch fixes checkpatch.pl check:
CHECK: Comparison to NULL could be written "!rx_p"
+ if (*rx_p == NULL) {
Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
---
drivers/staging/iio/accel/sca3000_ring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/iio/accel/sca3000_ring.c b/drivers/staging/iio/accel/sca3000_ring.c
index 20b878d..5339b10 100644
--- a/drivers/staging/iio/accel/sca3000_ring.c
+++ b/drivers/staging/iio/accel/sca3000_ring.c
@@ -48,7 +48,7 @@ static int sca3000_read_data(struct sca3000_state *st,
}
};
*rx_p = kmalloc(len, GFP_KERNEL);
- if (*rx_p == NULL) {
+ if (!rx_p) {
ret = -ENOMEM;
goto error_ret;
}
--
2.1.4
next reply other threads:[~2015-12-13 9:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-13 9:54 Bhaktipriya Shridhar [this message]
2015-12-13 11:07 ` [PATCH] Staging: iio: accel: Fixed NULL comparison style Dan Carpenter
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=20151213095427.GA6159@Karyakshetra \
--to=bhaktipriya96@gmail.com \
--cc=ciorneiioana@gmail.com \
--cc=cristina.moraru09@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@kernel.org \
--cc=josselin.costanzi@mobile-devices.fr \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
/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