Commit d36a4f4b authored by Jie Liu's avatar Jie Liu Committed by David S. Miller

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: default avatarJie Liu <jeff.liu@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5a7baa78
...@@ -1200,8 +1200,8 @@ static int register_queue_kobjects(struct net_device *net) ...@@ -1200,8 +1200,8 @@ static int register_queue_kobjects(struct net_device *net)
#ifdef CONFIG_SYSFS #ifdef CONFIG_SYSFS
net->queues_kset = kset_create_and_add("queues", net->queues_kset = kset_create_and_add("queues",
NULL, &net->dev.kobj); NULL, &net->dev.kobj);
if (!net->queues_kset) if (IS_ERR(net->queues_kset))
return -ENOMEM; return PTR_ERR(net->queues_kset);
real_rx = net->real_num_rx_queues; real_rx = net->real_num_rx_queues;
#endif #endif
real_tx = net->real_num_tx_queues; real_tx = net->real_num_tx_queues;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment