]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Staging: slicoss: changes comparisons to NULL in slicoss.c
authorBen Marsh <bmarsh94@gmail.com>
Tue, 1 Mar 2016 10:29:38 +0000 (11:29 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2016 06:09:09 +0000 (22:09 -0800)
This is a patch to slicoss.c to change the style of NULL comparisons in
order to remove checkpatch.pl warnings.

Signed-off-by: Ben Marsh <bmarsh94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/slicoss/slicoss.c

index 3c4114a08494797aa36eeb32e5399598071286a0..6d50fc4fd02eb8ea1f9da4e367e0f2f270839304 100644 (file)
@@ -1792,7 +1792,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);
@@ -1873,7 +1873,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,
@@ -2983,7 +2983,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(*card), GFP_KERNEL);
-               if (card == NULL)
+               if (!card)
                        return -ENOMEM;
 
                card->next = slic_global.slic_card;