|
@@ -1328,10 +1328,10 @@ static int nf_tables_newchain(struct sock *nlsk, struct sk_buff *skb,
|
|
basechain->stats = stats;
|
|
basechain->stats = stats;
|
|
} else {
|
|
} else {
|
|
stats = netdev_alloc_pcpu_stats(struct nft_stats);
|
|
stats = netdev_alloc_pcpu_stats(struct nft_stats);
|
|
- if (IS_ERR(stats)) {
|
|
|
|
|
|
+ if (stats == NULL) {
|
|
module_put(type->owner);
|
|
module_put(type->owner);
|
|
kfree(basechain);
|
|
kfree(basechain);
|
|
- return PTR_ERR(stats);
|
|
|
|
|
|
+ return -ENOMEM;
|
|
}
|
|
}
|
|
rcu_assign_pointer(basechain->stats, stats);
|
|
rcu_assign_pointer(basechain->stats, stats);
|
|
}
|
|
}
|