irda: net_device_ops ioctl fix
[safe/jmp/linux-2.6] / net / x25 / af_x25.c
index 8f76f40..9ca17b1 100644 (file)
@@ -951,10 +951,8 @@ int x25_rx_call_request(struct sk_buff *skb, struct x25_neigh *nb,
        /*
         *      Incoming Call User Data.
         */
-       if (skb->len >= 0) {
-               skb_copy_from_linear_data(skb, makex25->calluserdata.cuddata, skb->len);
-               makex25->calluserdata.cudlength = skb->len;
-       }
+       skb_copy_from_linear_data(skb, makex25->calluserdata.cuddata, skb->len);
+       makex25->calluserdata.cudlength = skb->len;
 
        sk->sk_ack_backlog++;
 
@@ -1122,8 +1120,9 @@ static int x25_sendmsg(struct kiocb *iocb, struct socket *sock,
        if (msg->msg_flags & MSG_OOB)
                skb_queue_tail(&x25->interrupt_out_queue, skb);
        else {
-               len = x25_output(sk, skb);
-               if (len < 0)
+               rc = x25_output(sk, skb);
+               len = rc;
+               if (rc < 0)
                        kfree_skb(skb);
                else if (x25->qbitincl)
                        len++;
@@ -1608,7 +1607,7 @@ static const struct proto_ops SOCKOPS_WRAPPED(x25_proto_ops) = {
 
 SOCKOPS_WRAP(x25_proto, AF_X25);
 
-static struct packet_type x25_packet_type = {
+static struct packet_type x25_packet_type __read_mostly = {
        .type = cpu_to_be16(ETH_P_X25),
        .func = x25_lapb_receive_frame,
 };