From: Greg Kroah-Hartman <gregkh@suse.de>
To: linux-kernel@vger.kernel.org
Cc: Xiaotian Feng <dfeng@redhat.com>, Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 4/5] driver core: sysdev: do not send KOBJ_ADD uevent if kobject_init_and_add fails
Date: Tue, 28 Jul 2009 14:44:40 -0700 [thread overview]
Message-ID: <1248817481-13372-4-git-send-email-gregkh@suse.de> (raw)
In-Reply-To: <20090728213826.GC13090@kroah.com>
From: Xiaotian Feng <dfeng@redhat.com>
If kobject_init_and_add fails, sysdev_register should not send KOBJ_ADD
uevent to userspace.
Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
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.3.2
next prev parent reply other threads:[~2009-07-28 21:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-28 21:38 [GIT PATCH] driver core patches for 2.6.31-rc4-git Greg KH
2009-07-28 21:44 ` [PATCH 1/5] sysfs: fix hardlink count on device_move Greg Kroah-Hartman
2009-07-28 21:44 ` [PATCH 2/5] driver core: firmware_class:fix memory leak of page pointers array Greg Kroah-Hartman
2009-07-28 21:44 ` [PATCH 3/5] Dynamic debug: fix typo: -/-> Greg Kroah-Hartman
2009-07-28 21:44 ` Greg Kroah-Hartman [this message]
2009-07-28 21:44 ` [PATCH 5/5] driver core: documentation: make it clear that sysfs is optional Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1248817481-13372-4-git-send-email-gregkh@suse.de \
--to=gregkh@suse.de \
--cc=dfeng@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox