liquidio: Missing error code in liquidio_init_nic_module()

We accidentally return success if lio_vf_rep_modinit() fails instead of
propogating the error code.

Fixes: e20f469660 ("liquidio: synchronize VF representor names with NIC firmware")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Dan Carpenter 2017-11-14 09:14:17 +03:00 committed by David S. Miller
parent fae45363ae
commit 228aa0121c

View File

@ -4038,7 +4038,8 @@ static int liquidio_init_nic_module(struct octeon_device *oct)
*/
if (!oct->octeon_id &&
oct->fw_info.app_cap_flags & LIQUIDIO_SWITCHDEV_CAP) {
if (lio_vf_rep_modinit()) {
retval = lio_vf_rep_modinit();
if (retval) {
liquidio_stop_nic_module(oct);
goto octnet_init_failure;
}