staging: ft1000: Use specific error return code for reg_ft1000_netdev().

Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Marek Belisko 2010-10-15 09:41:45 +02:00 committed by Greg Kroah-Hartman
parent 78890fdb24
commit aaf0885c30
3 changed files with 7 additions and 5 deletions

View file

@ -1103,7 +1103,7 @@ u16 init_ft1000_netdev(struct ft1000_device *ft1000dev)
// Notes:
//
//---------------------------------------------------------------------------
u16 reg_ft1000_netdev(struct ft1000_device *ft1000dev, struct usb_interface *intf)
int reg_ft1000_netdev(struct ft1000_device *ft1000dev, struct usb_interface *intf)
{
struct net_device *netdev;
FT1000_INFO *pInfo;
@ -1124,7 +1124,7 @@ u16 reg_ft1000_netdev(struct ft1000_device *ft1000dev, struct usb_interface *int
{
DEBUG("reg_ft1000_netdev: could not register network device\n");
free_netdev(netdev);
return STATUS_FAILURE;
return rc;
}
@ -1149,7 +1149,7 @@ u16 reg_ft1000_netdev(struct ft1000_device *ft1000dev, struct usb_interface *int
pInfo->CardReady = 1;
return STATUS_SUCCESS;
return 0;
}
static int ft1000_reset(struct net_device *dev)

View file

@ -191,7 +191,9 @@ static int ft1000_probe(struct usb_interface *interface,
DEBUG("ft1000_probe::Card Ready!!!! Registering network device\n");
reg_ft1000_netdev(ft1000dev, interface);
ret = reg_ft1000_netdev(ft1000dev, interface);
if (ret)
goto err_load;
pft1000info->NetDevRegDone = 1;

View file

@ -597,7 +597,7 @@ char *getfw (char *fn, size_t *pimgsz);
int dsp_reload(struct ft1000_device *ft1000dev);
u16 init_ft1000_netdev(struct ft1000_device *ft1000dev);
struct usb_interface;
u16 reg_ft1000_netdev(struct ft1000_device *ft1000dev, struct usb_interface *intf);
int reg_ft1000_netdev(struct ft1000_device *ft1000dev, struct usb_interface *intf);
int ft1000_poll(void* dev_id);
void ft1000InitProc(struct net_device *dev);