Since skb_clone can be failed in memory pressure,
return value of skb_clone needs to be checked.

Signed-off-by: Insu Yun <wuni...@gmail.com>
---
 drivers/isdn/hisax/isdnl2.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/isdn/hisax/isdnl2.c b/drivers/isdn/hisax/isdnl2.c
index 18accb0..e74f847 100644
--- a/drivers/isdn/hisax/isdnl2.c
+++ b/drivers/isdn/hisax/isdnl2.c
@@ -1284,6 +1284,10 @@ l2_pull_iqueue(struct FsmInst *fi, int event, void *arg)
        }
        l2->windowar[p1] = skb_clone(skb, GFP_ATOMIC);
 
+  if (!l2->windowar[p1]) {
+    return;
+  }
+
        i = sethdraddr(&st->l2, header, CMD);
 
        if (test_bit(FLG_MOD128, &l2->flag)) {
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to