Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5bc09186 authored by Matt Carlson's avatar Matt Carlson Committed by David S. Miller
Browse files

tg3: Fix irq alloc error cleanup path



This patch fixes a bug where the irq error cleanup path did not free all
the resources it allocated.

Signed-off-by: default avatarMatt Carlson <mcarlson@broadcom.com>
Signed-off-by: default avatarBen Li <benli@broadcom.com>
Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Reviewed-by: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ba1142e4
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -9677,14 +9677,13 @@ static int tg3_open(struct net_device *dev)
		struct tg3_napi *tnapi = &tp->napi[i];
		err = tg3_request_irq(tp, i);
		if (err) {
			for (i--; i >= 0; i--)
			for (i--; i >= 0; i--) {
				tnapi = &tp->napi[i];
				free_irq(tnapi->irq_vec, tnapi);
			break;
		}
			}

	if (err)
			goto err_out2;
		}
	}

	tg3_full_lock(tp, 0);