Skip to content

Commit

Permalink
liquidio: Missing error code in liquidio_init_nic_module()
Browse files Browse the repository at this point in the history
We accidentally return success if lio_vf_rep_modinit() fails instead of
propogating the error code.

Fixes: e20f469 ("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>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Nov 14, 2017
1 parent fae4536 commit 228aa01
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/cavium/liquidio/lio_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 228aa01

Please sign in to comment.