lkml.org 
[lkml]   [2003]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[AMD76X]
From
Hi:

amd76x_pm.c will crash if no chipsets are found and CONFIG_HOTPLUG is
turned on. This patch makes it return with a failure instead.

Cheers,
--
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Index: kernel-source-2.4/drivers/char/amd76x_pm.c
===================================================================
RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.4/drivers/char/amd76x_pm.c,v
retrieving revision 1.2
diff -u -r1.2 amd76x_pm.c
--- kernel-source-2.4/drivers/char/amd76x_pm.c 1 Dec 2002 05:52:05 -0000 1.2
+++ kernel-source-2.4/drivers/char/amd76x_pm.c 23 Aug 2003 23:30:11 -0000
@@ -577,16 +577,18 @@
int found;

/* Find northbridge */
- found = pci_module_init(&amd_nb_driver);
- if (found < 0) {
+ found = pci_register_driver(&amd_nb_driver);
+ if (found <= 0) {
printk(KERN_ERR "amd76x_pm: Could not find northbridge\n");
+ pci_unregister_driver(&amd_nb_driver);
return 1;
}

/* Find southbridge */
- found = pci_module_init(&amd_sb_driver);
- if (found < 0) {
+ found = pci_register_driver(&amd_sb_driver);
+ if (found <= 0) {
printk(KERN_ERR "amd76x_pm: Could not find southbridge\n");
+ pci_unregister_driver(&amd_sb_driver);
pci_unregister_driver(&amd_nb_driver);
return 1;
}
\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.050 / U:3.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site