[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1248427901-30992-1-git-send-email-dfeng@redhat.com>
Date: Fri, 24 Jul 2009 17:31:41 +0800
From: Xiaotian Feng <dfeng@...hat.com>
To: gregkh@...e.de
Cc: linux-kernel@...r.kernel.org, Xiaotian Feng <dfeng@...hat.com>
Subject: [PATCH] drivers/base: do not send KOBJ_ADD uevent if kobject_init_and_add fails
If kobject_init_and_add fails, sysdev_register should not send KOBJ_ADD
uevent to userspace.
Signed-off-by: Xiaotian Feng <dfeng@...hat.com>
---
drivers/base/sys.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/base/sys.c b/drivers/base/sys.c
index 79a9ae5..0d90390 100644
--- a/drivers/base/sys.c
+++ b/drivers/base/sys.c
@@ -275,9 +275,9 @@ int sysdev_register(struct sys_device *sysdev)
drv->add(sysdev);
}
mutex_unlock(&sysdev_drivers_lock);
+ kobject_uevent(&sysdev->kobj, KOBJ_ADD);
}
- kobject_uevent(&sysdev->kobj, KOBJ_ADD);
return error;
}
--
1.6.2.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists