Merge branch 'master' into for-linus
[linux-drm-fsl-dcu.git] / net / sched / act_nat.c
index 7b39ed485bca0beeb44da1572ff053ed61395d5f..d885ba311564d9a766fce6eac37edbaf0ed82b71 100644 (file)
@@ -68,8 +68,8 @@ static int tcf_nat_init(struct nlattr *nla, struct nlattr *est,
        if (!pc) {
                pc = tcf_hash_create(parm->index, est, a, sizeof(*p), bind,
                                     &nat_idx_gen, &nat_hash_info);
-               if (unlikely(!pc))
-                       return -ENOMEM;
+               if (IS_ERR(pc))
+                   return PTR_ERR(pc);
                p = to_tcf_nat(pc);
                ret = ACT_P_CREATED;
        } else {