mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 04:31:50 +00:00
tipc: add missing dev_put() on error in tipc_enable_l2_media
when tipc_own_id failed to obtain node identity,dev_put should
be call before return -EINVAL.
Fixes: 682cd3cf94
("tipc: confgiure and apply UDP bearer MTU on running links")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
201876b33c
commit
63135ee0a6
@ -395,6 +395,7 @@ int tipc_enable_l2_media(struct net *net, struct tipc_bearer *b,
|
||||
tipc_net_init(net, node_id, 0);
|
||||
}
|
||||
if (!tipc_own_id(net)) {
|
||||
dev_put(dev);
|
||||
pr_warn("Failed to obtain node identity\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user