X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=net%2Fax25%2Faf_ax25.c;h=dbf9b47681f72c119b217c44f4a883d1345ba6f9;hb=6146e6a43b3584c0c67b0ac94e3f14fdc618bd30;hp=8e37e71e34ff1929aef5a8b8efb2ef362dec6b54;hpb=4676356b57ee767d5a95df8270f5c372b838dd33;p=safe%2Fjmp%2Flinux-2.6 diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index 8e37e71..dbf9b47 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c @@ -14,6 +14,7 @@ * Copyright (C) Frederic Rible F1OAT (frible@teaser.fr) */ #include +#include #include #include #include @@ -54,7 +55,7 @@ HLIST_HEAD(ax25_list); DEFINE_SPINLOCK(ax25_list_lock); -static struct proto_ops ax25_proto_ops; +static const struct proto_ops ax25_proto_ops; static void ax25_free_sock(struct sock *sk) { @@ -1138,10 +1139,8 @@ static int ax25_connect(struct socket *sock, struct sockaddr *uaddr, sk->sk_state = TCP_CLOSE; sock->state = SS_UNCONNECTED; - if (ax25->digipeat != NULL) { - kfree(ax25->digipeat); - ax25->digipeat = NULL; - } + kfree(ax25->digipeat); + ax25->digipeat = NULL; /* * Handle digi-peaters to be used. @@ -1829,7 +1828,7 @@ static int ax25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) break; default: - res = dev_ioctl(cmd, argp); + res = -ENOIOCTLCMD; break; } release_sock(sk); @@ -1946,7 +1945,7 @@ static struct net_proto_family ax25_family_ops = { .owner = THIS_MODULE, }; -static struct proto_ops ax25_proto_ops = { +static const struct proto_ops ax25_proto_ops = { .family = PF_AX25, .owner = THIS_MODULE, .release = ax25_release,