Skip to contentSkip to conversation

kobject: return the result of uevent sending by netlink

PATCH New [email protected] 1 participant 1 message Nov 16, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kobject: return the result of uevent sending by netlink

From: Ming Lei <[email protected]>

We need to return the result of uevent sending by netlink to caller, when uevent_helper is disabled and CONFIG_NET is defined.

---
 lib/kobject_uevent.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
lib/kobject_uevent.c +4 -2
index 3f91472..c1919d5 100644
@@ -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
 
Signature · 1 line
1.6.0