mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
mlxsw: spectrum_router: Use helper to check for last neighbor
Use list_is_last helper to check for last neighbor. Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
dbe4598c1e
commit
ec2437f42b
1 changed files with 1 additions and 1 deletions
|
|
@ -1317,7 +1317,7 @@ mlxsw_sp_rif_neigh_next(struct mlxsw_sp_rif *rif,
|
|||
typeof(*neigh_entry),
|
||||
rif_list_node);
|
||||
}
|
||||
if (neigh_entry->rif_list_node.next == &rif->neigh_list)
|
||||
if (list_is_last(&neigh_entry->rif_list_node, &rif->neigh_list))
|
||||
return NULL;
|
||||
return list_next_entry(neigh_entry, rif_list_node);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue