Commit c95567c8 authored by Kim Lilliestierna XX's avatar Kim Lilliestierna XX Committed by David S. Miller

caif: added check for potential null return

Add check on NULL return from caif_get().
Signed-off-by: default avatarKim Lilliestierna <Kim.xx.Lilliestierna@stericsson.com>
Signed-off-by: default avatarSjur Brændeland <sjur.brandeland@stericssion.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent be4852c9
...@@ -128,6 +128,11 @@ void caif_flow_cb(struct sk_buff *skb) ...@@ -128,6 +128,11 @@ void caif_flow_cb(struct sk_buff *skb)
rcu_read_lock(); rcu_read_lock();
caifd = caif_get(skb->dev); caifd = caif_get(skb->dev);
WARN_ON(caifd == NULL);
if (caifd == NULL)
return;
caifd_hold(caifd); caifd_hold(caifd);
rcu_read_unlock(); rcu_read_unlock();
......
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