diff options
author | Kim Lilliestierna XX <kim.xx.lilliestierna@stericsson.com> | 2012-06-25 07:49:34 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-25 16:44:11 -0700 |
commit | c95567c8035281d20ca8266cb39f8d48307a70af (patch) | |
tree | 4dd0747fbad925550d5507cb5a4d4176ce397638 | |
parent | be4852c957b7c1e8eeac8d13c3ef228508c0873a (diff) | |
download | linux-c95567c8035281d20ca8266cb39f8d48307a70af.tar.gz linux-c95567c8035281d20ca8266cb39f8d48307a70af.tar.bz2 linux-c95567c8035281d20ca8266cb39f8d48307a70af.zip |
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>
-rw-r--r-- | net/caif/caif_dev.c | 5 |
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(); |