public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch][trivial] fix drivers/base/cpu.c
@ 2003-01-22 23:52 Matthew Dobson
  2003-01-29  4:51 ` Rusty Russell
  0 siblings, 1 reply; 4+ messages in thread
From: Matthew Dobson @ 2003-01-22 23:52 UTC (permalink / raw)
  To: linux-kernel
  Cc: William Lee Irwin III, Martin J. Bligh, Michael Hohnbaum,
	Trivial Patch Monkey

[-- Attachment #1: Type: text/plain, Size: 320 bytes --]

Both drivers/base/node.c & memblk.c check the return values of the 
devclass_register & driver_register calls.  cpu.c doesn't.  This little 
patch remedies that omission.

[mcd@arrakis push]$ diffstat sysfs_topo_cleanup-2.5.59.patch
  cpu.c |    4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)

Cheers!

-Matt

[-- Attachment #2: sysfs_topo_cleanup-2.5.59.patch --]
[-- Type: text/plain, Size: 558 bytes --]

diff -Nur --exclude-from=/usr/src/.dontdiff linux-2.5.58-vanilla/drivers/base/cpu.c linux-2.5.58-topo_cleanup/drivers/base/cpu.c
--- linux-2.5.58-vanilla/drivers/base/cpu.c	Mon Jan 13 21:58:28 2003
+++ linux-2.5.58-topo_cleanup/drivers/base/cpu.c	Thu Jan 16 16:48:23 2003
@@ -48,7 +48,7 @@
 
 static int __init register_cpu_type(void)
 {
-	devclass_register(&cpu_devclass);
-	return driver_register(&cpu_driver);
+	int error = devclass_register(&cpu_devclass);
+	return error ? error : driver_register(&cpu_driver);
 }
 postcore_initcall(register_cpu_type);

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-01-29 18:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-22 23:52 [patch][trivial] fix drivers/base/cpu.c Matthew Dobson
2003-01-29  4:51 ` Rusty Russell
2003-01-29  5:55   ` William Lee Irwin III
2003-01-29 18:19     ` Matthew Dobson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox