From 383624918bb7b6fdfc7f8d1c4a74f258f7357bcf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Romieu?= Date: Fri, 13 Feb 2004 20:41:16 -0800 Subject: [PATCH] [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(). --- drivers/net/irda/stir4200.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/irda/stir4200.c b/drivers/net/irda/stir4200.c index 2a7e865b4624a..d7bb8a6ac873f 100644 --- a/drivers/net/irda/stir4200.c +++ b/drivers/net/irda/stir4200.c @@ -913,6 +913,8 @@ static int stir_net_open(struct net_device *netdev) if (err) goto err_out1; + err = -ENOMEM; + /* Note: Max SIR frame possible is 4273 */ stir->tx_data = kmalloc(STIR_FIFO_SIZE, GFP_KERNEL); if (!stir->tx_data) { @@ -956,7 +958,6 @@ static int stir_net_open(struct net_device *netdev) * Note : will send immediately a speed change... */ sprintf(hwname, "usb#%d", stir->usbdev->devnum); - err = -ENOMEM; stir->irlap = irlap_open(netdev, &stir->qos, hwname); if (!stir->irlap) { ERROR("%s(): irlap_open failed\n", __FUNCTION__); -- 2.53.0