Commit 38362491 authored by François Romieu's avatar François Romieu Committed by David S. Miller

[IRDA]: Fix error return status in stir4200 driver.

If stir_reset() succeeds, stir_net_open() must not return a
success status code for every failure until irlap_open().
parent f6eb8139
...@@ -913,6 +913,8 @@ static int stir_net_open(struct net_device *netdev) ...@@ -913,6 +913,8 @@ static int stir_net_open(struct net_device *netdev)
if (err) if (err)
goto err_out1; goto err_out1;
err = -ENOMEM;
/* Note: Max SIR frame possible is 4273 */ /* Note: Max SIR frame possible is 4273 */
stir->tx_data = kmalloc(STIR_FIFO_SIZE, GFP_KERNEL); stir->tx_data = kmalloc(STIR_FIFO_SIZE, GFP_KERNEL);
if (!stir->tx_data) { if (!stir->tx_data) {
...@@ -956,7 +958,6 @@ static int stir_net_open(struct net_device *netdev) ...@@ -956,7 +958,6 @@ static int stir_net_open(struct net_device *netdev)
* Note : will send immediately a speed change... * Note : will send immediately a speed change...
*/ */
sprintf(hwname, "usb#%d", stir->usbdev->devnum); sprintf(hwname, "usb#%d", stir->usbdev->devnum);
err = -ENOMEM;
stir->irlap = irlap_open(netdev, &stir->qos, hwname); stir->irlap = irlap_open(netdev, &stir->qos, hwname);
if (!stir->irlap) { if (!stir->irlap) {
ERROR("%s(): irlap_open failed\n", __FUNCTION__); ERROR("%s(): irlap_open failed\n", __FUNCTION__);
......
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