* [PATCH v2] Staging: slicoss: Use !x instead of x == NULL.
@ 2016-03-06 11:38 Sandhya Bankar
2016-03-11 18:08 ` [Outreachy kernel] " Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Sandhya Bankar @ 2016-03-06 11:38 UTC (permalink / raw)
To: outreachy-kernel
Use !x instead of x == NULL.This patch is found by checkpatch.pl script.
Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
---
Changes in v2:
* No change.
*Compile this patch to check nothing is broken.
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 a91c60a..acf73f0 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(struct mcast_address), 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Outreachy kernel] [PATCH v2] Staging: slicoss: Use !x instead of x == NULL.
2016-03-06 11:38 [PATCH v2] Staging: slicoss: Use !x instead of x == NULL Sandhya Bankar
@ 2016-03-11 18:08 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2016-03-11 18:08 UTC (permalink / raw)
To: Sandhya Bankar; +Cc: outreachy-kernel
On Sun, Mar 06, 2016 at 05:08:38PM +0530, Sandhya Bankar wrote:
> Use !x instead of x == NULL.This patch is found by checkpatch.pl script.
>
> Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
> ---
> Changes in v2:
> * No change.
> *Compile this patch to check nothing is broken.
Someone sent this patch before you did, sorry about that :(
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-11 18:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-06 11:38 [PATCH v2] Staging: slicoss: Use !x instead of x == NULL Sandhya Bankar
2016-03-11 18:08 ` [Outreachy kernel] " Greg KH
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.