summaryrefslogtreecommitdiff
blob: d2035b6d2fef14d354b4111944f8d30dceaac87a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
From Linux 2.6.10 onwards, pci_register_driver returns 0 on success and negative on failure

- Daniel Drake <dsd@gentoo.org>

--- slmodem-2.9.10/drivers/amrmo_init.c.orig	2004-12-25 23:53:51.345258848 +0000
+++ slmodem-2.9.10/drivers/amrmo_init.c	2004-12-25 23:54:33.528845968 +0000
@@ -740,7 +740,7 @@
 	}
 #endif
 
-	if (!pci_register_driver(&amrmo_pci_driver)) {
+	if (pci_register_driver(&amrmo_pci_driver) < 0) {
 		pci_unregister_driver(&amrmo_pci_driver);
 #ifndef OLD_KERNEL
 		class_simple_destroy(amrmo_class);