mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] staging: ks7010: Remove unnecessary null check
@ 2018-09-30  8:34 Aymen Qader
  0 siblings, 0 replies; only message in thread
From: Aymen Qader @ 2018-09-30  8:34 UTC (permalink / raw)
  Cc: Wolfram Sang, Aymen Qader, Greg Kroah-Hartman, devel, linux-kernel

Remove the unnecessary socket buffer null check in hostif_data_request.
There is already an appropriate null check in the calling function:

(ks_wlan_net.c) ks_wlan_start_xmit

Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
---
 drivers/staging/ks7010/ks_hostif.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
index 0e554e3359b5..ca030d3f609f 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -1023,8 +1023,8 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *skb)
 	    priv->wpa.mic_failure.stop) {
 		if (netif_queue_stopped(priv->net_dev))
 			netif_wake_queue(priv->net_dev);
-		if (skb)
-			dev_kfree_skb(skb);
+
+		dev_kfree_skb(skb);
 
 		return 0;
 	}
-- 
2.17.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-09-30  8:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-30  8:34 [PATCH] staging: ks7010: Remove unnecessary null check Aymen Qader

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®