[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1206627098-2456-2-git-send-email-den@openvz.org>
Date: Thu, 27 Mar 2008 17:11:34 +0300
From: "Denis V. Lunev" <den@...nvz.org>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, "Denis V. Lunev" <den@...nvz.org>
Subject: [PATCH 2/6 net-2.6.26] [UDP]: No need to check afinfo != NULL in udp_proc_(un)register.
udp_proc_register/udp_proc_unregister are called with a static pointer only.
Signed-off-by: Denis V. Lunev <den@...nvz.org>
---
net/ipv4/udp.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 6d740ad..c05f45b 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1631,8 +1631,6 @@ int udp_proc_register(struct net *net, struct udp_seq_afinfo *afinfo)
struct proc_dir_entry *p;
int rc = 0;
- if (!afinfo)
- return -EINVAL;
afinfo->seq_fops->owner = afinfo->owner;
afinfo->seq_fops->open = udp_seq_open;
afinfo->seq_fops->read = seq_read;
@@ -1649,8 +1647,6 @@ int udp_proc_register(struct net *net, struct udp_seq_afinfo *afinfo)
void udp_proc_unregister(struct net *net, struct udp_seq_afinfo *afinfo)
{
- if (!afinfo)
- return;
proc_net_remove(net, afinfo->name);
memset(afinfo->seq_fops, 0, sizeof(*afinfo->seq_fops));
}
--
1.5.3.rc5
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists