mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
[NET]: dev_put/dev_hold cleanup
Get rid of the old __dev_put macro that is just a hold over from pre 2.6 kernel. And turn dev_hold into an inline instead of a macro. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
2d0817d11e
commit
1533306186
5 changed files with 9 additions and 7 deletions
|
|
@ -1382,7 +1382,7 @@ static struct in_device * ip_mc_find_dev(struct ip_mreqn *imr)
|
|||
dev = ip_dev_find(imr->imr_address.s_addr);
|
||||
if (!dev)
|
||||
return NULL;
|
||||
__dev_put(dev);
|
||||
dev_put(dev);
|
||||
}
|
||||
|
||||
if (!dev && !ip_route_output_key(&rt, &fl)) {
|
||||
|
|
|
|||
|
|
@ -415,10 +415,10 @@ static int vif_add(struct vifctl *vifc, int mrtsock)
|
|||
return -ENOBUFS;
|
||||
break;
|
||||
case 0:
|
||||
dev=ip_dev_find(vifc->vifc_lcl_addr.s_addr);
|
||||
dev = ip_dev_find(vifc->vifc_lcl_addr.s_addr);
|
||||
if (!dev)
|
||||
return -EADDRNOTAVAIL;
|
||||
__dev_put(dev);
|
||||
dev_put(dev);
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue