public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.6.11] fix: drivers/base/class.c
@ 2005-03-10 12:08 JustMan
  2005-03-10 15:28 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: JustMan @ 2005-03-10 12:08 UTC (permalink / raw)
  To: linux-kernel

fix: drivers/base/class.c

Signed-off-by: Serge A. Suchkov <justman@e1.bmstu.ru>

diff -uNrp linux/drivers/base/class.orig.c  linux/drivers/base/class.c
--- linux/drivers/base/class.orig.c 2005-03-10 12:19:00.000000000 +0300
+++ linux/drivers/base/class.c 2005-03-10 13:59:27.000000000 +0300
@@ -307,12 +307,14 @@ static int class_hotplug(struct kset *ks
  if (class_dev->dev) {
   /* add physical device, backing this device  */
   struct device *dev = class_dev->dev;
-  char *path = kobject_get_path(&dev->kobj, GFP_KERNEL);
 
-  add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size,
-        &length, "PHYSDEVPATH=%s", path);
-  kfree(path);
+  if(kobject_name(&dev->kobj)) {
+   char *path = kobject_get_path(&dev->kobj, GFP_KERNEL);
 
+   add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size,
+        &length, "PHYSDEVPATH=%s", path);
+   kfree(path);
+  }
   /* add bus name of physical device */
   if (dev->bus)
    add_hotplug_env_var(envp, num_envp, &i,

-- 
Regards, JustMan.

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

end of thread, other threads:[~2005-03-11  5:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-10 12:08 [PATCH 2.6.11] fix: drivers/base/class.c JustMan
2005-03-10 15:28 ` Greg KH
2005-03-11  5:30   ` JustMan

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