kobject: return the result of uevent sending by netlink

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 <[email protected]>
Cc: Kay Sievers <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index ca215bc..318328dd 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -225,8 +225,10 @@
 			}
 
 			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