From: Kim Lilliestierna XX Date: Mon, 25 Jun 2012 07:49:34 +0000 (+0000) Subject: caif: added check for potential null return X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c95567c80352;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git caif: added check for potential null return Add check on NULL return from caif_get(). Signed-off-by: Kim Lilliestierna Signed-off-by: Sjur Brændeland Signed-off-by: David S. Miller --- 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();