bnx2x: use list_move instead of list_del/list_add
Using list_move() instead of list_del() + list_add(). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Родитель
2e3a118f82
Коммит
3a918f4036
|
@ -557,8 +557,7 @@ static int bnx2x_vfop_config_list(struct bnx2x *bp,
|
|||
rc = bnx2x_config_vlan_mac(bp, vlan_mac);
|
||||
if (rc >= 0) {
|
||||
cnt += pos->add ? 1 : -1;
|
||||
list_del(&pos->link);
|
||||
list_add(&pos->link, &rollback_list);
|
||||
list_move(&pos->link, &rollback_list);
|
||||
rc = 0;
|
||||
} else if (rc == -EEXIST) {
|
||||
rc = 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче