From: Sandhya Bankar <bankarsandhya512@gmail.com>
To: outreachy-kernel@googlegroups.com
Subject: [PATCH] Staging: slicoss: Use !x instead of x == NULL.
Date: Wed, 24 Feb 2016 11:17:49 +0530 [thread overview]
Message-ID: <20160224054659.GA3980@sandhya> (raw)
Use !x instead of x == NULL.This patch is found by checkpatch.pl script.
Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
---
drivers/staging/slicoss/slicoss.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
index ea6b7b5..ed1c067 100644
--- a/drivers/staging/slicoss/slicoss.c
+++ b/drivers/staging/slicoss/slicoss.c
@@ -1807,7 +1807,7 @@ static int slic_mcast_add_list(struct adapter *adapter, char *address)
/* Doesn't already exist. Allocate a structure to hold it */
mcaddr = kmalloc(sizeof(*mcaddr), GFP_ATOMIC);
- if (mcaddr == NULL)
+ if (!mcaddr)
return 1;
ether_addr_copy(mcaddr->address, address);
@@ -1888,7 +1888,7 @@ static void slic_xmit_fail(struct adapter *adapter,
{
if (adapter->xmitq_full)
netif_stop_queue(adapter->netdev);
- if ((cmd == NULL) && (status <= XMIT_FAIL_HOSTCMD_FAIL)) {
+ if (!cmd && (status <= XMIT_FAIL_HOSTCMD_FAIL)) {
switch (status) {
case XMIT_FAIL_LINK_STATE:
dev_err(&adapter->netdev->dev,
@@ -2999,7 +2999,7 @@ static u32 slic_card_locate(struct adapter *adapter)
/* Initialize a new card structure if need be */
if (card_hostid == SLIC_HOSTID_DEFAULT) {
card = kzalloc(sizeof(struct sliccard), GFP_KERNEL);
- if (card == NULL)
+ if (!card)
return -ENOMEM;
card->next = slic_global.slic_card;
--
1.8.3.4
reply other threads:[~2016-02-24 13:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20160224054659.GA3980@sandhya \
--to=bankarsandhya512@gmail.com \
--cc=outreachy-kernel@googlegroups.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.