linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Greg KH <greg@kroah.com>
Cc: Linux Kernel List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Prevent PCI driver registration failure oopsing
Date: Tue, 28 Oct 2003 11:48:05 +0100	[thread overview]
Message-ID: <jehe1tvdsq.fsf@sykes.suse.de> (raw)
In-Reply-To: <20031028100402.F22424@flint.arm.linux.org.uk> (Russell King's message of "Tue, 28 Oct 2003 10:04:02 +0000")

Russell King <rmk+lkml@arm.linux.org.uk> writes:

> --- orig/include/linux/pci.h	Thu Mar 13 14:24:56 2003
> +++ linux/include/linux/pci.h	Wed Mar 12 19:37:41 2003
> @@ -768,26 +768,7 @@
>  {
>  	int rc = pci_register_driver (drv);
>  
> -	if (rc > 0)
> -		return 0;
> -
> -	/* iff CONFIG_HOTPLUG and built into kernel, we should
> -	 * leave the driver around for future hotplug events.
> -	 * For the module case, a hotplug daemon of some sort
> -	 * should load a module in response to an insert event. */
> -#if defined(CONFIG_HOTPLUG) && !defined(MODULE)
> -	if (rc == 0)
> -		return 0;
> -#else
> -	if (rc == 0)
> -		rc = -ENODEV;		
> -#endif
> -
> -	/* if we get here, we need to clean up pci driver instance
> -	 * and return some sort of error */
> -	pci_unregister_driver (drv);
> -	
> -	return rc;
> +	return rc < 0 ? : 0;

Are you sure you want to return 1 if rc < 0?

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

  reply	other threads:[~2003-10-28 10:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-28 10:04 [PATCH] Prevent PCI driver registration failure oopsing Russell King
2003-10-28 10:48 ` Andreas Schwab [this message]
2003-10-28 10:51   ` Russell King
2003-10-29 23:30     ` Greg KH

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=jehe1tvdsq.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=greg@kroah.com \
    --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;
as well as URLs for NNTP newsgroup(s).