mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH -mm] kernel/params: must_check fixes
@ 2006-07-12  3:48 Randy.Dunlap
  0 siblings, 0 replies; only message in thread
From: Randy.Dunlap @ 2006-07-12  3:48 UTC (permalink / raw)
  To: lkml; +Cc: akpm

From: Randy Dunlap <rdunlap@xenotime.net>

Check all __must_check warnings in kernel/params.c

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
 kernel/params.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

--- linux-2618-rc1mm1.orig/kernel/params.c
+++ linux-2618-rc1mm1/kernel/params.c
@@ -547,6 +547,7 @@ static void __init kernel_param_sysfs_se
 					    unsigned int name_skip)
 {
 	struct module_kobject *mk;
+	int ret;
 
 	mk = kzalloc(sizeof(struct module_kobject), GFP_KERNEL);
 	BUG_ON(!mk);
@@ -554,7 +555,8 @@ static void __init kernel_param_sysfs_se
 	mk->mod = THIS_MODULE;
 	kobj_set_kset_s(mk, module_subsys);
 	kobject_set_name(&mk->kobj, name);
-	kobject_register(&mk->kobj);
+	ret = kobject_register(&mk->kobj);
+	BUG_ON(ret < 0);
 
 	/* no need to keep the kobject if no parameter is exported */
 	if (!param_sysfs_setup(mk, kparam, num_params, name_skip)) {
@@ -684,7 +686,14 @@ decl_subsys(module, &module_ktype, NULL)
  */
 static int __init param_sysfs_init(void)
 {
-	subsystem_register(&module_subsys);
+	int ret;
+
+	ret = subsystem_register(&module_subsys);
+	if (ret < 0) {
+		printk(KERN_WARNING "%s (%d): subsystem_register error: %d\n",
+			__FILE__, __LINE__, ret);
+		return ret;
+	}
 
 	param_sysfs_builtin();
 


---

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-07-12  3:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-12  3:48 [PATCH -mm] kernel/params: must_check fixes Randy.Dunlap

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

all inboxes | Powered by JetHome®