ixgbe: Fix an error handling path in ixgbe_read_iosf_sb_reg_x550()
[platform/kernel/linux-starfive.git] / drivers / net / ethernet / intel / ixgbe / ixgbe_x550.c
index fe2d2d2..cdc912b 100644 (file)
@@ -717,7 +717,8 @@ static s32 ixgbe_read_iosf_sb_reg_x550(struct ixgbe_hw *hw, u32 reg_addr,
                error = (command & IXGBE_SB_IOSF_CTRL_CMPL_ERR_MASK) >>
                         IXGBE_SB_IOSF_CTRL_CMPL_ERR_SHIFT;
                hw_dbg(hw, "Failed to read, error %x\n", error);
-               return -EIO;
+               ret = -EIO;
+               goto out;
        }
 
        if (!ret)