Commit 35e9403b authored by Marek Belisko's avatar Marek Belisko Committed by Greg Kroah-Hartman

staging: ft1000: Use specific error codes instead self defined.

Signed-off-by: default avatarMarek Belisko <marek.belisko@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent d2b07455
...@@ -1025,7 +1025,7 @@ static int ft1000_copy_down_pkt (struct net_device *netdev, u8 *packet, u16 len) ...@@ -1025,7 +1025,7 @@ static int ft1000_copy_down_pkt (struct net_device *netdev, u8 *packet, u16 len)
{ {
DEBUG("ft1000_copy_down_pkt::Card Not Ready\n"); DEBUG("ft1000_copy_down_pkt::Card Not Ready\n");
return STATUS_FAILURE; return -ENODEV;
} }
...@@ -1037,7 +1037,7 @@ static int ft1000_copy_down_pkt (struct net_device *netdev, u8 *packet, u16 len) ...@@ -1037,7 +1037,7 @@ static int ft1000_copy_down_pkt (struct net_device *netdev, u8 *packet, u16 len)
{ {
DEBUG("Error:ft1000_copy_down_pkt:Message Size Overflow!\n"); DEBUG("Error:ft1000_copy_down_pkt:Message Size Overflow!\n");
DEBUG("size = %d\n", count); DEBUG("size = %d\n", count);
return STATUS_FAILURE; return -EINVAL;
} }
if ( count % 4) if ( count % 4)
...@@ -1080,25 +1080,18 @@ static int ft1000_copy_down_pkt (struct net_device *netdev, u8 *packet, u16 len) ...@@ -1080,25 +1080,18 @@ static int ft1000_copy_down_pkt (struct net_device *netdev, u8 *packet, u16 len)
}*/ }*/
ret = usb_submit_urb(pFt1000Dev->tx_urb, GFP_ATOMIC); ret = usb_submit_urb(pFt1000Dev->tx_urb, GFP_ATOMIC);
if(ret) if (ret) {
{
DEBUG("ft1000 failed tx_urb %d\n", ret); DEBUG("ft1000 failed tx_urb %d\n", ret);
return ret;
return STATUS_FAILURE; } else {
pInfo->stats.tx_packets++;
} pInfo->stats.tx_bytes += (len+14);
else }
{
//DEBUG("ft1000 sucess tx_urb %d\n", ret);
pInfo->stats.tx_packets++;
pInfo->stats.tx_bytes += (len+14);
}
//DEBUG("ft1000_copy_down_pkt() exit\n"); //DEBUG("ft1000_copy_down_pkt() exit\n");
return STATUS_SUCCESS; return 0;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment