Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=aaf70ec7fde2321281b2a49c7c9f881c90d0d208
Commit:     aaf70ec7fde2321281b2a49c7c9f881c90d0d208
Parent:     16910b9829797cda4032fbc84e5292ac7b4474f7
Author:     Pavel Emelyanov <[EMAIL PROTECTED]>
AuthorDate: Wed Oct 17 21:25:32 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Oct 17 21:25:32 2007 -0700

    [IPV6]: Cleanup snmp6_alloc_dev()
    
    This functions is never called with NULL or not setup argument,
    so the checks inside are redundant.
    
    Also, the return value is always -ENOMEM, so no need in
    additional variable for this.
    
    Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/ipv6/addrconf.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index edf06ca..348bd8d 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -255,11 +255,6 @@ static void addrconf_mod_timer(struct inet6_ifaddr *ifp,
 
 static int snmp6_alloc_dev(struct inet6_dev *idev)
 {
-       int err = -ENOMEM;
-
-       if (!idev || !idev->dev)
-               return -EINVAL;
-
        if (snmp_mib_init((void **)idev->stats.ipv6,
                          sizeof(struct ipstats_mib),
                          __alignof__(struct ipstats_mib)) < 0)
@@ -280,7 +275,7 @@ err_icmpmsg:
 err_icmp:
        snmp_mib_free((void **)idev->stats.ipv6);
 err_ip:
-       return err;
+       return -ENOMEM;
 }
 
 static void snmp6_free_dev(struct inet6_dev *idev)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to