ppp, slip: Validate VJ compression slot parameters completely
[linux-3.10.git] / drivers / net / slip / slip.c
index a34d6bf..ca3e737 100644 (file)
@@ -163,7 +163,7 @@ static int sl_alloc_bufs(struct slip *sl, int mtu)
        if (cbuff == NULL)
                goto err_exit;
        slcomp = slhc_init(16, 16);
-       if (slcomp == NULL)
+       if (IS_ERR(slcomp))
                goto err_exit;
 #endif
        spin_lock_bh(&sl->lock);