From: Marek Belisko Date: Tue, 2 Nov 2010 13:51:47 +0000 (+0100) Subject: staging: ft1000: Check return value. X-Git-Tag: firefly_0821_release~7613^2~3069^2~373 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=95112cb448b5962daeee68db8ee523b71266e28b;p=firefly-linux-kernel-4.4.55.git staging: ft1000: Check return value. Function ft1000_submit_rx_urb() could fail so add checking for return value. Signed-off-by: Marek Belisko Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c index 30a847565ef4..1fa1f811b017 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c @@ -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); @@ -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; } //---------------------------------------------------------------------------