|
@@ -1003,7 +1003,7 @@ static int get_info(struct net *net, void __user *user,
|
|
|
#endif
|
|
|
t = try_then_request_module(xt_find_table_lock(net, AF_INET6, name),
|
|
|
"ip6table_%s", name);
|
|
|
- if (!IS_ERR_OR_NULL(t)) {
|
|
|
+ if (t) {
|
|
|
struct ip6t_getinfo info;
|
|
|
const struct xt_table_info *private = t->private;
|
|
|
#ifdef CONFIG_COMPAT
|
|
@@ -1033,7 +1033,7 @@ static int get_info(struct net *net, void __user *user,
|
|
|
xt_table_unlock(t);
|
|
|
module_put(t->me);
|
|
|
} else
|
|
|
- ret = t ? PTR_ERR(t) : -ENOENT;
|
|
|
+ ret = -ENOENT;
|
|
|
#ifdef CONFIG_COMPAT
|
|
|
if (compat)
|
|
|
xt_compat_unlock(AF_INET6);
|
|
@@ -1059,7 +1059,7 @@ get_entries(struct net *net, struct ip6t_get_entries __user *uptr,
|
|
|
get.name[sizeof(get.name) - 1] = '\0';
|
|
|
|
|
|
t = xt_find_table_lock(net, AF_INET6, get.name);
|
|
|
- if (!IS_ERR_OR_NULL(t)) {
|
|
|
+ if (t) {
|
|
|
struct xt_table_info *private = t->private;
|
|
|
if (get.size == private->size)
|
|
|
ret = copy_entries_to_user(private->size,
|
|
@@ -1070,7 +1070,7 @@ get_entries(struct net *net, struct ip6t_get_entries __user *uptr,
|
|
|
module_put(t->me);
|
|
|
xt_table_unlock(t);
|
|
|
} else
|
|
|
- ret = t ? PTR_ERR(t) : -ENOENT;
|
|
|
+ ret = -ENOENT;
|
|
|
|
|
|
return ret;
|
|
|
}
|
|
@@ -1095,8 +1095,8 @@ __do_replace(struct net *net, const char *name, unsigned int valid_hooks,
|
|
|
|
|
|
t = try_then_request_module(xt_find_table_lock(net, AF_INET6, name),
|
|
|
"ip6table_%s", name);
|
|
|
- if (IS_ERR_OR_NULL(t)) {
|
|
|
- ret = t ? PTR_ERR(t) : -ENOENT;
|
|
|
+ if (!t) {
|
|
|
+ ret = -ENOENT;
|
|
|
goto free_newinfo_counters_untrans;
|
|
|
}
|
|
|
|
|
@@ -1210,8 +1210,8 @@ do_add_counters(struct net *net, const void __user *user, unsigned int len,
|
|
|
if (IS_ERR(paddc))
|
|
|
return PTR_ERR(paddc);
|
|
|
t = xt_find_table_lock(net, AF_INET6, tmp.name);
|
|
|
- if (IS_ERR_OR_NULL(t)) {
|
|
|
- ret = t ? PTR_ERR(t) : -ENOENT;
|
|
|
+ if (!t) {
|
|
|
+ ret = -ENOENT;
|
|
|
goto free;
|
|
|
}
|
|
|
|
|
@@ -1647,7 +1647,7 @@ compat_get_entries(struct net *net, struct compat_ip6t_get_entries __user *uptr,
|
|
|
|
|
|
xt_compat_lock(AF_INET6);
|
|
|
t = xt_find_table_lock(net, AF_INET6, get.name);
|
|
|
- if (!IS_ERR_OR_NULL(t)) {
|
|
|
+ if (t) {
|
|
|
const struct xt_table_info *private = t->private;
|
|
|
struct xt_table_info info;
|
|
|
ret = compat_table_info(private, &info);
|
|
@@ -1661,7 +1661,7 @@ compat_get_entries(struct net *net, struct compat_ip6t_get_entries __user *uptr,
|
|
|
module_put(t->me);
|
|
|
xt_table_unlock(t);
|
|
|
} else
|
|
|
- ret = t ? PTR_ERR(t) : -ENOENT;
|
|
|
+ ret = -ENOENT;
|
|
|
|
|
|
xt_compat_unlock(AF_INET6);
|
|
|
return ret;
|