net: Remove redundant if statements
The 'if (dev)' statement already move into dev_{put , hold}, so remove redundant if statements. Signed-off-by: Yajun Deng <yajun.deng@linux.dev> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
a85b99ab6a
commit
1160dfa178
@ -2813,8 +2813,7 @@ struct dst_entry *ipv4_blackhole_route(struct net *net, struct dst_entry *dst_or
|
||||
new->output = dst_discard_out;
|
||||
|
||||
new->dev = net->loopback_dev;
|
||||
if (new->dev)
|
||||
dev_hold(new->dev);
|
||||
dev_hold(new->dev);
|
||||
|
||||
rt->rt_is_input = ort->rt_is_input;
|
||||
rt->rt_iif = ort->rt_iif;
|
||||
|
Reference in New Issue
Block a user