[patch][trivial] fix drivers/base/cpu.c

Matthew Dobson (colpatch@us.ibm.com)
Wed, 22 Jan 2003 15:52:33 -0800


This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_courier-2601-1043280060-0001-2
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

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

--=_courier-2601-1043280060-0001-2
Content-Type: text/plain; name="sysfs_topo_cleanup-2.5.59.patch"; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="sysfs_topo_cleanup-2.5.59.patch"

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);

--=_courier-2601-1043280060-0001-2--