liquidio: Missing error code in liquidio_init_nic_module()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 14 Nov 2017 06:14:17 +0000 (09:14 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Nov 2017 13:01:06 +0000 (22:01 +0900)
We accidentally return success if lio_vf_rep_modinit() fails instead of
propogating the error code.

Fixes: e20f469660ad ("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>
drivers/net/ethernet/cavium/liquidio/lio_main.c

index f05045a69dcc6622c9477cefa6896c96956f51af..6aa0eee88ea529963850828fc1ab46eb36d75095 100644 (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;
                }