Skip to content

Commit

Permalink
staging: ft1000: Use specific error return code for reg_ft1000_netdev().
Browse files Browse the repository at this point in the history
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Marek Belisko authored and Greg Kroah-Hartman committed Oct 15, 2010
1 parent 78890fd commit aaf0885
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}


Expand All @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit aaf0885

Please sign in to comment.