mirror of
https://github.com/torvalds/linux.git
synced 2024-11-06 20:21:57 +00:00
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>
This commit is contained in:
parent
5a7baa7885
commit
d36a4f4b47
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user