diff options
author | Kim Lilliestierna XX <kim.xx.lilliestierna@stericsson.com> | 2012-06-25 03:49:34 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-25 19:44:11 -0400 |
commit | c95567c8035281d20ca8266cb39f8d48307a70af (patch) | |
tree | 4dd0747fbad925550d5507cb5a4d4176ce397638 | |
parent | be4852c957b7c1e8eeac8d13c3ef228508c0873a (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>
-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) | |||
128 | 128 | ||
129 | rcu_read_lock(); | 129 | rcu_read_lock(); |
130 | caifd = caif_get(skb->dev); | 130 | caifd = caif_get(skb->dev); |
131 | |||
132 | WARN_ON(caifd == NULL); | ||
133 | if (caifd == NULL) | ||
134 | return; | ||
135 | |||
131 | caifd_hold(caifd); | 136 | caifd_hold(caifd); |
132 | rcu_read_unlock(); | 137 | rcu_read_unlock(); |
133 | 138 | ||