All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Viro <aviro@redhat.com>
To: Stephen Hemminger <shemminger@osdl.org>
Cc: Jeff Garzik <jgarzik@pobox.com>,
	netdev@oss.sgi.com, Alexander Viro <aviro@redhat.com>
Subject: Re: [PATCH] skfddi - convert to new pci model.
Date: Thu, 4 Dec 2003 19:59:16 -0500	[thread overview]
Message-ID: <20031205005915.GD31510@devserv.devel.redhat.com> (raw)
In-Reply-To: <20031204163928.0f34d5d1.shemminger@osdl.org>

On Thu, Dec 04, 2003 at 04:39:28PM -0800, Stephen Hemminger wrote:
> +	dev->irq = pdev->irq;
>  	dev->get_stats = &skfp_ctl_get_stats;
>  	dev->open = &skfp_open;
>  	dev->stop = &skfp_close;
> +	dev->init = &skfp_driver_init;

Ehh...  Don't do that, please.  net_device ->init() means trouble,
since getting failure from register_netdev() gives you no clue
whether it had failed before, during or after ->init().  Makes
for an interesting cleanup...

You can do that if required cleanup can be deduced from the state
of *dev after register_netdev() failure (e.g. if no cleanup is
ever needed), but generally it's less PITA to just call the
damn function directly before register_netdev() and leave ->init NULL.

  reply	other threads:[~2003-12-05  0:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-05  0:39 [PATCH] skfddi - convert to new pci model Stephen Hemminger
2003-12-05  0:59 ` Alexander Viro [this message]
2003-12-05 23:12   ` Stephen Hemminger
2003-12-05 23:27     ` Alexander Viro
2003-12-16  5:43     ` Jeff Garzik

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=20031205005915.GD31510@devserv.devel.redhat.com \
    --to=aviro@redhat.com \
    --cc=jgarzik@pobox.com \
    --cc=netdev@oss.sgi.com \
    --cc=shemminger@osdl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.