Skip to contentSkip to conversation

Staging: wlan-ng: Convert explicit comparison to NULL to !x.

PATCH Superseded Sandhya Bankar 3 participants 3 messages Feb 20, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 Staging: wlan-ng: Convert explicit comparison to NULL to !x.

Convert explicit comparison to NULL to !x.

---
Changes in v3:
*In v2,missed to add comment below --- so adding comment *Adding Full name in signed-off-by line.

 drivers/staging/wlan-ng/p80211conv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wlan-ng/p80211conv.c +1 -1
index 1b02cdf..86fd23f 100644
@@ -613,7 +613,7 @@ int p80211skb_rxmeta_attach(struct wlandevice *wlandev, struct sk_buff *skb)
 	/* Allocate the rxmeta */
 	rxmeta = kzalloc(sizeof(struct p80211_rxmeta), GFP_ATOMIC);
 
-	if (rxmeta == NULL) {
+	if (!rxmeta) {
 		netdev_err(wlandev->netdev,
 			   "%s: Failed to allocate rxmeta.\n", wlandev->name);
 		result = 1;
Signature · 1 line
1.8.3.4
#1 lore raw
Quoted 3 lines · Sandhya Bankar

Convert explicit comparison to NULL to !x.

Everything looks fine now, but the change was already made in the following commit:

d23054350d0fafdc4a6f8d68b18cd70ec581c95d

Maybe you need to update your kernel.

julia

Quoted 31 lines

---
Changes in v3:
*In v2,missed to add comment below --- so adding comment *Adding Full name in signed-off-by line.

 drivers/staging/wlan-ng/p80211conv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wlan-ng/p80211conv.c +1 -2
index 1b02cdf..86fd23f 100644
@@ -613,7 +613,7 @@ int p80211skb_rxmeta_attach(struct wlandevice *wlandev, struct sk_buff *skb)
 	/* Allocate the rxmeta */
 	rxmeta = kzalloc(sizeof(struct p80211_rxmeta), GFP_ATOMIC);
 
-	if (rxmeta == NULL) {
+	if (!rxmeta) {
 		netdev_err(wlandev->netdev,
 			   "%s: Failed to allocate rxmeta.\n", wlandev->name);
 		result = 1;
--

1.8.3.4

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160220115438.GA3260%40sandhya.
For more options, visit https://groups.google.com/d/optout.

maintainer
#2 lore raw
In reply to Sandhya Bankar
Quoted 8 lines · Sandhya Bankar

Convert explicit comparison to NULL to !x.

---
Changes in v3:
*In v2,missed to add comment below --- so adding comment *Adding Full name in signed-off-by line.

You sent 2 patches with the identical subject: line, yet they did different things. I can't accept that, please make them unique.

thanks,

greg k-h