rtl8139.c lacks a free_irq().

Daniel Kobras (daniel.kobras@student.uni-tuebingen.de)
Wed, 14 Jul 1999 18:35:01 +0200 (CEST)


Hi.

The Realtek 8139 driver in 2.3.11pre4 (driver version 1.07) is missing a
free_irq() in case the kmalloc()s in rtl8129_open() fail. The patch below
applies to 2.3.11pre4, a similar fix is required in 2.2.x (driver version
1.04).

Regards,

Daniel.

---[snip]---

--- rtl8139.c.orig Wed Jul 14 18:34:22 1999
+++ rtl8139.c Wed Jul 14 18:35:01 1999
@@ -680,6 +680,7 @@
tp->tx_bufs = kmalloc(TX_BUF_SIZE * NUM_TX_DESC, GFP_KERNEL);
tp->rx_ring = kmalloc(RX_BUF_LEN + 16, GFP_KERNEL);
if (tp->tx_bufs == NULL || tp->rx_ring == NULL) {
+ free_irq(dev->irq, dev);
if (tp->tx_bufs)
kfree(tp->tx_bufs);
if (rtl8129_debug > 0)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/