summaryrefslogtreecommitdiff
path: root/net/caif
diff options
context:
space:
mode:
authorKim Lilliestierna XX <kim.xx.lilliestierna@stericsson.com>2012-06-25 07:49:34 +0000
committerDavid S. Miller <davem@davemloft.net>2012-06-25 16:44:11 -0700
commitc95567c8035281d20ca8266cb39f8d48307a70af (patch)
tree4dd0747fbad925550d5507cb5a4d4176ce397638 /net/caif
parentbe4852c957b7c1e8eeac8d13c3ef228508c0873a (diff)
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>
Diffstat (limited to 'net/caif')
-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();