netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 23/24] net: return actual error on register_queue_kobjects
@ 2014-06-17 14:32 Jeff Liu
  2014-06-18 23:59 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Liu @ 2014-06-17 14:32 UTC (permalink / raw)
  To: davem; +Cc: netdev

From: Jie Liu <jeff.liu@oracle.com>

Return the actual error code if call kset_create_and_add() failed

Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Jie Liu <jeff.liu@oracle.com>
---
 net/core/net-sysfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 1cac29e..5c1c1e5 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -1200,8 +1200,8 @@ static int register_queue_kobjects(struct net_device *net)
 #ifdef CONFIG_SYSFS
 	net->queues_kset = kset_create_and_add("queues",
 	    NULL, &net->dev.kobj);
-	if (!net->queues_kset)
-		return -ENOMEM;
+	if (IS_ERR(net->queues_kset))
+		return PTR_ERR(net->queues_kset);
 	real_rx = net->real_num_rx_queues;
 #endif
 	real_tx = net->real_num_tx_queues;
-- 
1.8.3.2

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

* Re: [PATCH 23/24] net: return actual error on register_queue_kobjects
  2014-06-17 14:32 [PATCH 23/24] net: return actual error on register_queue_kobjects Jeff Liu
@ 2014-06-18 23:59 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-06-18 23:59 UTC (permalink / raw)
  To: jeff.liu; +Cc: netdev

From: Jeff Liu <jeff.liu@oracle.com>
Date: Tue, 17 Jun 2014 22:32:42 +0800

> From: Jie Liu <jeff.liu@oracle.com>
> 
> Return the actual error code if call kset_create_and_add() failed
> 
> Cc: David S. Miller <davem@davemloft.net>
> Signed-off-by: Jie Liu <jeff.liu@oracle.com>

Applied, thanks.

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

end of thread, other threads:[~2014-06-18 23:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-17 14:32 [PATCH 23/24] net: return actual error on register_queue_kobjects Jeff Liu
2014-06-18 23:59 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).