From: Jeff Garzik <jgarzik@pobox.com>
To: davej@codemonkey.org.uk
Cc: linux-kernel@vger.kernel.org
Subject: Re: misc au1000 cleanups.
Date: Sat, 29 Mar 2003 00:26:43 -0500 [thread overview]
Message-ID: <3E852E93.9090404@pobox.com> (raw)
In-Reply-To: <200303241642.h2OGg035008226@deviant.impure.org.uk>
davej@codemonkey.org.uk wrote:
> - Missing release region
> - Unneeded initialisation of private struct
> (already done in init_etherdev)
> - Remove unneeded freeing of dev->priv
> (auto-free'd by kfree(dev)
> - actually kfree (dev), plugging leak.
>
> diff -urpN --exclude-from=/home/davej/.exclude bk-linus/drivers/net/au1000_eth.c linux-2.5/drivers/net/au1000_eth.c
> --- bk-linus/drivers/net/au1000_eth.c 2003-03-08 09:57:14.000000000 +0000
> +++ linux-2.5/drivers/net/au1000_eth.c 2003-02-20 12:16:32.000000000 +0000
> @@ -675,37 +675,24 @@ au1000_probe1(struct net_device *dev, lo
> char *pmac, *argptr;
> char ethaddr[6];
>
> - if (!request_region(ioaddr, MAC_IOSIZE, "Au1000 ENET")) {
> + if (!request_region(ioaddr, MAC_IOSIZE, "Au1000 ENET"))
> return -ENODEV;
> - }
>
> if (version_printed++ == 0) printk(version);
>
> - if (!dev) {
> + if (!dev)
> dev = init_etherdev(0, sizeof(struct au1000_private));
> - }
> +
> if (!dev) {
> - printk (KERN_ERR "au1000 eth: init_etherdev failed\n");
> - return -ENODEV;
> + printk (KERN_ERR "au1000 eth: init_etherdev failed\n");
> + release_region(ioaddr, MAC_IOSIZE);
> + return -ENODEV;
> }
'dev' is always NULL as passed to the function... just kill the argument
to the function. Otherwise, looks ok.
Jeff
prev parent reply other threads:[~2003-03-29 5:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-24 16:41 misc au1000 cleanups davej
2003-03-29 5:26 ` Jeff Garzik [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3E852E93.9090404@pobox.com \
--to=jgarzik@pobox.com \
--cc=davej@codemonkey.org.uk \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox