mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-11 23:03:55 +08:00
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
@ -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 New Issue
Block a user