Skip to content

Commit

Permalink
staging: ft1000: Check return value.
Browse files Browse the repository at this point in the history
Function ft1000_submit_rx_urb() could fail so add checking
for return value.

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 Nov 10, 2010
1 parent d778086 commit 95112cb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1347,6 +1347,7 @@ static int ft1000_open (struct net_device *dev)
{
struct ft1000_info *pInfo = (struct ft1000_info *)netdev_priv(dev);
struct timeval tv; //mbelian
int ret;

DEBUG("ft1000_open is called for card %d\n", pInfo->CardNumber);
//DEBUG("ft1000_open: dev->addr=%x, dev->addr_len=%d\n", dev->addr, dev->addr_len);
Expand All @@ -1364,8 +1365,9 @@ static int ft1000_open (struct net_device *dev)

netif_carrier_on(dev); //mbelian

ft1000_submit_rx_urb(pInfo);
return 0;
ret = ft1000_submit_rx_urb(pInfo);

return ret;
}

//---------------------------------------------------------------------------
Expand Down

0 comments on commit 95112cb

Please sign in to comment.