summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/caif/caif_dev.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/caif/caif_dev.c b/net/caif/caif_dev.c
index e601da7ca2ff..551d2fd6a80d 100644
--- a/net/caif/caif_dev.c
+++ b/net/caif/caif_dev.c
@@ -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();