Jiri Slaby wrote:
+unprobe:
+ for (j = i; j > 0; j--) {
+ struct gt96100_if_t *gtif = >ifs[j - 1];
+ gt96100_remove1(gtif);
+ }
+ kfree(gtifs);
upon failure, you fail to set drvdata back to NULL
What is the purpose of setting this to NULL, other drivers don't do that too?
A simple grep(1) shows well over 300 cases that do this.
And it's just logical: don't leave a pointer hanging around, after it
has been kfree'd.
+ struct gt96100_private *gp = netdev_priv(gtif->dev);
+ unregister_netdev(gtif->dev);
+ dmafree(RX_HASH_TABLE_SIZE, gp->hash_table_dma);
+ dmafree(PKT_BUF_SZ*RX_RING_SIZE, gp->rx_buff);
+ dmafree(sizeof(gt96100_rd_t) * RX_RING_SIZE
+ + sizeof(gt96100_td_t) * TX_RING_SIZE,
+ gp->rx_ring);
+ free_netdev(gtif->dev);
+ release_region(gtif->iobase, gp->io_size);
shouldn't this be using pci_request_regions() / pci_release_regions() ?
There are GT96100_ETH{0,1}_BASEs instead of bars,
Indeed. I stand corrected.
Jeff
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]