diff options
Diffstat (limited to 'net/netrom')
-rw-r--r-- | net/netrom/af_netrom.c | 6 | ||||
-rw-r--r-- | net/netrom/nr_loopback.c | 2 | ||||
-rw-r--r-- | net/netrom/nr_timer.c | 3 |
3 files changed, 2 insertions, 9 deletions
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c index 3aa133d02..d4e4802b9 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c @@ -1281,12 +1281,6 @@ void __init nr_proto_init(struct net_proto *pro) memset(dev_nr, 0x00, nr_ndevs * sizeof(struct net_device)); for (i = 0; i < nr_ndevs; i++) { - dev_nr[i].name = kmalloc(20, GFP_KERNEL); - if(dev_nr[i].name==NULL) - { - printk(KERN_ERR "Netrom: unable to register devices.\n"); - break; - } sprintf(dev_nr[i].name, "nr%d", i); dev_nr[i].init = nr_init; register_netdev(&dev_nr[i]); diff --git a/net/netrom/nr_loopback.c b/net/netrom/nr_loopback.c index af0e410f4..fc0665de2 100644 --- a/net/netrom/nr_loopback.c +++ b/net/netrom/nr_loopback.c @@ -38,7 +38,7 @@ void nr_loopback_init(void) static int nr_loopback_running(void) { - return (loopback_timer.prev != NULL || loopback_timer.next != NULL); + return timer_pending(&loopback_timer); } int nr_loopback_queue(struct sk_buff *skb) diff --git a/net/netrom/nr_timer.c b/net/netrom/nr_timer.c index b3fbd012e..ac62ad54a 100644 --- a/net/netrom/nr_timer.c +++ b/net/netrom/nr_timer.c @@ -129,8 +129,7 @@ void nr_stop_heartbeat(struct sock *sk) int nr_t1timer_running(struct sock *sk) { - return (sk->protinfo.nr->t1timer.prev != NULL || - sk->protinfo.nr->t1timer.next != NULL); + return timer_pending(&sk->protinfo.nr->t1timer); } static void nr_heartbeat_expiry(unsigned long param) |