diff options
author | David S. Miller <davem@davemloft.net> | 2010-09-10 01:27:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-10 01:27:33 -0400 |
commit | e548833df83c3554229eff0672900bfe958b45fd (patch) | |
tree | 85efc4a76dc356593d6d394776aeb845dc580fb6 /drivers/firewire/net.c | |
parent | cbd9da7be869f676afc204e1a664163778c770bd (diff) | |
parent | 053d8f6622701f849fda2ca2c9ae596c13599ba9 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
net/mac80211/main.c
Diffstat (limited to 'drivers/firewire/net.c')
-rw-r--r-- | drivers/firewire/net.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c index 51e8a35ebd7e..18fdd9703b48 100644 --- a/drivers/firewire/net.c +++ b/drivers/firewire/net.c | |||
@@ -578,7 +578,7 @@ static int fwnet_finish_incoming_packet(struct net_device *net, | |||
578 | if (!peer) { | 578 | if (!peer) { |
579 | fw_notify("No peer for ARP packet from %016llx\n", | 579 | fw_notify("No peer for ARP packet from %016llx\n", |
580 | (unsigned long long)peer_guid); | 580 | (unsigned long long)peer_guid); |
581 | goto failed_proto; | 581 | goto no_peer; |
582 | } | 582 | } |
583 | 583 | ||
584 | /* | 584 | /* |
@@ -655,7 +655,7 @@ static int fwnet_finish_incoming_packet(struct net_device *net, | |||
655 | 655 | ||
656 | return 0; | 656 | return 0; |
657 | 657 | ||
658 | failed_proto: | 658 | no_peer: |
659 | net->stats.rx_errors++; | 659 | net->stats.rx_errors++; |
660 | net->stats.rx_dropped++; | 660 | net->stats.rx_dropped++; |
661 | 661 | ||
@@ -663,7 +663,7 @@ static int fwnet_finish_incoming_packet(struct net_device *net, | |||
663 | if (netif_queue_stopped(net)) | 663 | if (netif_queue_stopped(net)) |
664 | netif_wake_queue(net); | 664 | netif_wake_queue(net); |
665 | 665 | ||
666 | return 0; | 666 | return -ENOENT; |
667 | } | 667 | } |
668 | 668 | ||
669 | static int fwnet_incoming_packet(struct fwnet_device *dev, __be32 *buf, int len, | 669 | static int fwnet_incoming_packet(struct fwnet_device *dev, __be32 *buf, int len, |
@@ -700,7 +700,7 @@ static int fwnet_incoming_packet(struct fwnet_device *dev, __be32 *buf, int len, | |||
700 | fw_error("out of memory\n"); | 700 | fw_error("out of memory\n"); |
701 | net->stats.rx_dropped++; | 701 | net->stats.rx_dropped++; |
702 | 702 | ||
703 | return -1; | 703 | return -ENOMEM; |
704 | } | 704 | } |
705 | skb_reserve(skb, (net->hard_header_len + 15) & ~15); | 705 | skb_reserve(skb, (net->hard_header_len + 15) & ~15); |
706 | memcpy(skb_put(skb, len), buf, len); | 706 | memcpy(skb_put(skb, len), buf, len); |
@@ -725,8 +725,10 @@ static int fwnet_incoming_packet(struct fwnet_device *dev, __be32 *buf, int len, | |||
725 | spin_lock_irqsave(&dev->lock, flags); | 725 | spin_lock_irqsave(&dev->lock, flags); |
726 | 726 | ||
727 | peer = fwnet_peer_find_by_node_id(dev, source_node_id, generation); | 727 | peer = fwnet_peer_find_by_node_id(dev, source_node_id, generation); |
728 | if (!peer) | 728 | if (!peer) { |
729 | goto bad_proto; | 729 | retval = -ENOENT; |
730 | goto fail; | ||
731 | } | ||
730 | 732 | ||
731 | pd = fwnet_pd_find(peer, datagram_label); | 733 | pd = fwnet_pd_find(peer, datagram_label); |
732 | if (pd == NULL) { | 734 | if (pd == NULL) { |
@@ -740,7 +742,7 @@ static int fwnet_incoming_packet(struct fwnet_device *dev, __be32 *buf, int len, | |||
740 | dg_size, buf, fg_off, len); | 742 | dg_size, buf, fg_off, len); |
741 | if (pd == NULL) { | 743 | if (pd == NULL) { |
742 | retval = -ENOMEM; | 744 | retval = -ENOMEM; |
743 | goto bad_proto; | 745 | goto fail; |
744 | } | 746 | } |
745 | peer->pdg_size++; | 747 | peer->pdg_size++; |
746 | } else { | 748 | } else { |
@@ -754,9 +756,9 @@ static int fwnet_incoming_packet(struct fwnet_device *dev, __be32 *buf, int len, | |||
754 | pd = fwnet_pd_new(net, peer, datagram_label, | 756 | pd = fwnet_pd_new(net, peer, datagram_label, |
755 | dg_size, buf, fg_off, len); | 757 | dg_size, buf, fg_off, len); |
756 | if (pd == NULL) { | 758 | if (pd == NULL) { |
757 | retval = -ENOMEM; | ||
758 | peer->pdg_size--; | 759 | peer->pdg_size--; |
759 | goto bad_proto; | 760 | retval = -ENOMEM; |
761 | goto fail; | ||
760 | } | 762 | } |
761 | } else { | 763 | } else { |
762 | if (!fwnet_pd_update(peer, pd, buf, fg_off, len)) { | 764 | if (!fwnet_pd_update(peer, pd, buf, fg_off, len)) { |
@@ -767,7 +769,8 @@ static int fwnet_incoming_packet(struct fwnet_device *dev, __be32 *buf, int len, | |||
767 | */ | 769 | */ |
768 | fwnet_pd_delete(pd); | 770 | fwnet_pd_delete(pd); |
769 | peer->pdg_size--; | 771 | peer->pdg_size--; |
770 | goto bad_proto; | 772 | retval = -ENOMEM; |
773 | goto fail; | ||
771 | } | 774 | } |
772 | } | 775 | } |
773 | } /* new datagram or add to existing one */ | 776 | } /* new datagram or add to existing one */ |
@@ -793,14 +796,13 @@ static int fwnet_incoming_packet(struct fwnet_device *dev, __be32 *buf, int len, | |||
793 | spin_unlock_irqrestore(&dev->lock, flags); | 796 | spin_unlock_irqrestore(&dev->lock, flags); |
794 | 797 | ||
795 | return 0; | 798 | return 0; |
796 | 799 | fail: | |
797 | bad_proto: | ||
798 | spin_unlock_irqrestore(&dev->lock, flags); | 800 | spin_unlock_irqrestore(&dev->lock, flags); |
799 | 801 | ||
800 | if (netif_queue_stopped(net)) | 802 | if (netif_queue_stopped(net)) |
801 | netif_wake_queue(net); | 803 | netif_wake_queue(net); |
802 | 804 | ||
803 | return 0; | 805 | return retval; |
804 | } | 806 | } |
805 | 807 | ||
806 | static void fwnet_receive_packet(struct fw_card *card, struct fw_request *r, | 808 | static void fwnet_receive_packet(struct fw_card *card, struct fw_request *r, |