提交 5bc09186 编写于 作者: M Matt Carlson 提交者: David S. Miller

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: NMatt Carlson <mcarlson@broadcom.com>
Signed-off-by: NBen Li <benli@broadcom.com>
Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
Reviewed-by: NMichael Chan <mchan@broadcom.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ba1142e4
......@@ -9677,15 +9677,14 @@ 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;
}
goto err_out2;
}
}
if (err)
goto err_out2;
tg3_full_lock(tp, 0);
err = tg3_init_hw(tp, 1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册