summaryrefslogtreecommitdiffstats
path: root/drivers/net/hamradio
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2015-03-05 18:48:46 +0100
committerDavid S. Miller <davem@davemloft.net>2015-03-07 03:50:42 +0100
commitfeb27d155dfabcb8baabe10367f25fc2b1bcede1 (patch)
treed78b81abe2f05d367e90b411473c0ce239a9d389 /drivers/net/hamradio
parentMerge branch 'mlx4-qcn' (diff)
downloadlinux-feb27d155dfabcb8baabe10367f25fc2b1bcede1.tar.xz
linux-feb27d155dfabcb8baabe10367f25fc2b1bcede1.zip
ax25: remove unneeded NULL test in ax_xmit()
We get a static checker warning here on devel kernels: drivers/net/hamradio/mkiss.c:560 ax_xmit() warn: variable dereferenced before check 'skb' (see line 532) It turns out that the NULL check can be deleted. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hamradio')
-rw-r--r--drivers/net/hamradio/mkiss.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c
index 17058c490b79..2ffbf13471d0 100644
--- a/drivers/net/hamradio/mkiss.c
+++ b/drivers/net/hamradio/mkiss.c
@@ -557,11 +557,9 @@ static netdev_tx_t ax_xmit(struct sk_buff *skb, struct net_device *dev)
}
/* We were not busy, so we are now... :-) */
- if (skb != NULL) {
- netif_stop_queue(dev);
- ax_encaps(dev, skb->data, skb->len);
- kfree_skb(skb);
- }
+ netif_stop_queue(dev);
+ ax_encaps(dev, skb->data, skb->len);
+ kfree_skb(skb);
return NETDEV_TX_OK;
}