caif: added check for potential null return
Add check on NULL return from caif_get(). Signed-off-by: Kim Lilliestierna <Kim.xx.Lilliestierna@stericsson.com> Signed-off-by: Sjur Brændeland <sjur.brandeland@stericssion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
be4852c957
commit
c95567c803
1 changed files with 5 additions and 0 deletions
|
@ -128,6 +128,11 @@ void caif_flow_cb(struct sk_buff *skb)
|
|||
|
||||
rcu_read_lock();
|
||||
caifd = caif_get(skb->dev);
|
||||
|
||||
WARN_ON(caifd == NULL);
|
||||
if (caifd == NULL)
|
||||
return;
|
||||
|
||||
caifd_hold(caifd);
|
||||
rcu_read_unlock();
|
||||
|
||||
|
|
Loading…
Reference in a new issue