IB/rxe: Fix rxe dev insertion to rxe_dev_list
authorMaor Gottlieb <maorg@mellanox.com>
Thu, 19 Jan 2017 13:25:58 +0000 (15:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Feb 2017 07:33:12 +0000 (08:33 +0100)
commitfed1e89a16e3684e1bd218e1d6a78f83b5ceb865
treecf4483da980f500f9ba05c4d83842fd6f763c661
parentc81ee4ed9c0d49514254487eb037548dd5e25ef8
IB/rxe: Fix rxe dev insertion to rxe_dev_list

commit f39f775218a7520e3700de2003c84a042c3b5972 upstream.

The first argument of list_add_tail is the new item and the second
is the head of the list. Fix the code to pass arguments in the
right order, otherwise not all the rxe devices will be removed
during teardown.

Fixes: 8700e3e7c4857 ('Soft RoCE driver')
Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Reviewed-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/sw/rxe/rxe_net.c