diff options
author | Antoine Tenart <atenart@kernel.org> | 2021-10-07 19:16:52 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-08 19:02:35 +0300 |
commit | d03eb9787d3aa74da0379cd34345686227580000 (patch) | |
tree | e8a44f6bed263bb610e6c566a9b7104057e19fac /drivers/net/ppp | |
parent | caa9b35fadff57e6ee7499f2fb26f8abd83a133b (diff) | |
download | linux-d03eb9787d3aa74da0379cd34345686227580000.tar.xz |
ppp: use the correct function to check if a netdev name is in use
A new helper to detect if a net device name is in use was added. Use it
here as the return reference from __dev_get_by_name was discarded.
Signed-off-by: Antoine Tenart <atenart@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ppp')
-rw-r--r-- | drivers/net/ppp/ppp_generic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c index fb52cd175b45..1180a0e2445f 100644 --- a/drivers/net/ppp/ppp_generic.c +++ b/drivers/net/ppp/ppp_generic.c @@ -1161,7 +1161,7 @@ static int ppp_unit_register(struct ppp *ppp, int unit, bool ifname_is_set) if (!ifname_is_set) { while (1) { snprintf(ppp->dev->name, IFNAMSIZ, "ppp%i", ret); - if (!__dev_get_by_name(ppp->ppp_net, ppp->dev->name)) + if (!netdev_name_in_use(ppp->ppp_net, ppp->dev->name)) break; unit_put(&pn->units_idr, ret); ret = unit_get(&pn->units_idr, ppp, ret + 1); |