aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/mlx4/qp.c3
-rw-r--r--drivers/net/netxen/netxen_nic_niu.c6
-rw-r--r--drivers/net/tulip/de2104x.c1
3 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/mlx4/qp.c b/drivers/net/mlx4/qp.c
index 7f8b7d55b6e1..492cfaaaa75c 100644
--- a/drivers/net/mlx4/qp.c
+++ b/drivers/net/mlx4/qp.c
@@ -113,8 +113,7 @@ int mlx4_qp_modify(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
113 struct mlx4_cmd_mailbox *mailbox; 113 struct mlx4_cmd_mailbox *mailbox;
114 int ret = 0; 114 int ret = 0;
115 115
116 if (cur_state < 0 || cur_state >= MLX4_QP_NUM_STATE || 116 if (cur_state >= MLX4_QP_NUM_STATE || cur_state >= MLX4_QP_NUM_STATE ||
117 new_state < 0 || cur_state >= MLX4_QP_NUM_STATE ||
118 !op[cur_state][new_state]) 117 !op[cur_state][new_state])
119 return -EINVAL; 118 return -EINVAL;
120 119
diff --git a/drivers/net/netxen/netxen_nic_niu.c b/drivers/net/netxen/netxen_nic_niu.c
index 75102d30730f..05e0577a0e10 100644
--- a/drivers/net/netxen/netxen_nic_niu.c
+++ b/drivers/net/netxen/netxen_nic_niu.c
@@ -724,7 +724,7 @@ int netxen_niu_disable_gbe_port(struct netxen_adapter *adapter)
724 __u32 mac_cfg0; 724 __u32 mac_cfg0;
725 u32 port = physical_port[adapter->portnum]; 725 u32 port = physical_port[adapter->portnum];
726 726
727 if ((port < 0) || (port > NETXEN_NIU_MAX_GBE_PORTS)) 727 if (port > NETXEN_NIU_MAX_GBE_PORTS)
728 return -EINVAL; 728 return -EINVAL;
729 mac_cfg0 = 0; 729 mac_cfg0 = 0;
730 netxen_gb_soft_reset(mac_cfg0); 730 netxen_gb_soft_reset(mac_cfg0);
@@ -757,7 +757,7 @@ int netxen_niu_set_promiscuous_mode(struct netxen_adapter *adapter,
757 __u32 reg; 757 __u32 reg;
758 u32 port = physical_port[adapter->portnum]; 758 u32 port = physical_port[adapter->portnum];
759 759
760 if ((port < 0) || (port > NETXEN_NIU_MAX_GBE_PORTS)) 760 if (port > NETXEN_NIU_MAX_GBE_PORTS)
761 return -EINVAL; 761 return -EINVAL;
762 762
763 /* save previous contents */ 763 /* save previous contents */
@@ -894,7 +894,7 @@ int netxen_niu_xg_set_promiscuous_mode(struct netxen_adapter *adapter,
894 __u32 reg; 894 __u32 reg;
895 u32 port = physical_port[adapter->portnum]; 895 u32 port = physical_port[adapter->portnum];
896 896
897 if ((port < 0) || (port > NETXEN_NIU_MAX_XG_PORTS)) 897 if (port > NETXEN_NIU_MAX_XG_PORTS)
898 return -EINVAL; 898 return -EINVAL;
899 899
900 if (netxen_nic_hw_read_wx(adapter, 900 if (netxen_nic_hw_read_wx(adapter,
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c
index 861729806dc1..d380e0b3f05a 100644
--- a/drivers/net/tulip/de2104x.c
+++ b/drivers/net/tulip/de2104x.c
@@ -785,7 +785,6 @@ static void __de_set_rx_mode (struct net_device *dev)
785 785
786 de->tx_head = NEXT_TX(entry); 786 de->tx_head = NEXT_TX(entry);
787 787
788 BUG_ON(TX_BUFFS_AVAIL(de) < 0);
789 if (TX_BUFFS_AVAIL(de) == 0) 788 if (TX_BUFFS_AVAIL(de) == 0)
790 netif_stop_queue(dev); 789 netif_stop_queue(dev);
791 790
/a> 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888























































































































































































































































































































































































































































































































































































































































































































































































































































































































                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
‹