summaryrefslogtreecommitdiffstats
path: root/net/caif
diff options
context:
space:
mode:
authorSjur Braendeland <sjur.brandeland@stericsson.com>2010-09-21 11:44:45 +0000
committerDavid S. Miller <davem@davemloft.net>2010-09-21 18:05:31 -0700
commite5e03ce1e5c6c015cabf274b24976dff408dc07f (patch)
tree678a2979a820f2ec3e99b26561a8eff2d35c0267 /net/caif
parentb04367df66eb63444d38c43d15f5e39499d85ae6 (diff)
downloadop-kernel-dev-e5e03ce1e5c6c015cabf274b24976dff408dc07f.zip
op-kernel-dev-e5e03ce1e5c6c015cabf274b24976dff408dc07f.tar.gz
caif: Fix function NULL pointer check.
Check that receive function pointer is not null before calling it. Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/caif')
-rw-r--r--net/caif/caif_dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/caif/caif_dev.c b/net/caif/caif_dev.c
index 0fd01dd..b99369a 100644
--- a/net/caif/caif_dev.c
+++ b/net/caif/caif_dev.c
@@ -173,7 +173,7 @@ static int receive(struct sk_buff *skb, struct net_device *dev,
net = dev_net(dev);
pkt = cfpkt_fromnative(CAIF_DIR_IN, skb);
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;
if (caifd->layer.up->receive(caifd->layer.up, pkt))
OpenPOWER on IntegriCloud