diff options
author | Jie Liu <jeff.liu@oracle.com> | 2014-06-17 10:32:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-06-18 19:58:40 -0400 |
commit | d36a4f4b472334562b8e7252e35d3d770db83815 (patch) | |
tree | 7c176e9fa4e7df558c90c3dd2fd7e01136201f74 /net | |
parent | 5a7baa78851b8e915480aa596de4bd2f13f31ffb (diff) |
net: return actual error on register_queue_kobjects
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/net-sysfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 1cac29ebb05b..5c1c1e526a2b 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) | |||
1200 | #ifdef CONFIG_SYSFS | 1200 | #ifdef CONFIG_SYSFS |
1201 | net->queues_kset = kset_create_and_add("queues", | 1201 | net->queues_kset = kset_create_and_add("queues", |
1202 | NULL, &net->dev.kobj); | 1202 | NULL, &net->dev.kobj); |
1203 | if (!net->queues_kset) | 1203 | if (IS_ERR(net->queues_kset)) |
1204 | return -ENOMEM; | 1204 | return PTR_ERR(net->queues_kset); |
1205 | real_rx = net->real_num_rx_queues; | 1205 | real_rx = net->real_num_rx_queues; |
1206 | #endif | 1206 | #endif |
1207 | real_tx = net->real_num_tx_queues; | 1207 | real_tx = net->real_num_tx_queues; |