Commit e5e03ce1 authored by Sjur Braendeland's avatar Sjur Braendeland Committed by David S. Miller

caif: Fix function NULL pointer check.

Check that receive function pointer is not null before calling it.
Signed-off-by: default avatarSjur Braendeland <sjur.brandeland@stericsson.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b04367df
...@@ -173,7 +173,7 @@ static int receive(struct sk_buff *skb, struct net_device *dev, ...@@ -173,7 +173,7 @@ static int receive(struct sk_buff *skb, struct net_device *dev,
net = dev_net(dev); net = dev_net(dev);
pkt = cfpkt_fromnative(CAIF_DIR_IN, skb); pkt = cfpkt_fromnative(CAIF_DIR_IN, skb);
caifd = caif_get(dev); caifd = caif_get(dev);
if (!caifd || !caifd->layer.up || !caifd->layer.up->ctrlcmd) if (!caifd || !caifd->layer.up || !caifd->layer.up->receive)
return NET_RX_DROP; return NET_RX_DROP;
if (caifd->layer.up->receive(caifd->layer.up, pkt)) if (caifd->layer.up->receive(caifd->layer.up, pkt))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment