kobject: return the result of uevent sending by netlink
authorMing Lei <tom.leiming@gmail.com>
Sun, 16 Nov 2008 10:23:27 +0000 (18:23 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 6 Jan 2009 18:44:31 +0000 (10:44 -0800)
We need to return the result of uevent sending by netlink
to caller, when uevent_helper is disabled and CONFIG_NET
is defined.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
lib/kobject_uevent.c

index ca215bc2329a6fdf38fe901808f6cb013f26fddd..318328ddbd1cf57b89cc84dc63b2818b480231d9 100644 (file)
@@ -225,8 +225,10 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
                        }
 
                        NETLINK_CB(skb).dst_group = 1;
-                       netlink_broadcast(uevent_sock, skb, 0, 1, GFP_KERNEL);
-               }
+                       retval = netlink_broadcast(uevent_sock, skb, 0, 1,
+                                                  GFP_KERNEL);
+               } else
+                       retval = -ENOMEM;
        }
 #endif