Skip to content

Commit e5e03ce

Browse files
Sjur Braendelanddavem330
authored andcommitted
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>
1 parent b04367d commit e5e03ce

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/caif/caif_dev.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ static int receive(struct sk_buff *skb, struct net_device *dev,
173173
net = dev_net(dev);
174174
pkt = cfpkt_fromnative(CAIF_DIR_IN, skb);
175175
caifd = caif_get(dev);
176-
if (!caifd || !caifd->layer.up || !caifd->layer.up->ctrlcmd)
176+
if (!caifd || !caifd->layer.up || !caifd->layer.up->receive)
177177
return NET_RX_DROP;
178178

179179
if (caifd->layer.up->receive(caifd->layer.up, pkt))

0 commit comments

Comments
 (0)