The present invention provides a linear stapler having a multi-functional retaining pin subassembly. The linear stapler comprises a handle stem connecting an anvil to a handle, and the retaining pin subassembly is movably supported on the handle stem and comprises a connecting cover having a retaining pin extending from the connecting cover. The present invention also provides a multi-functional retaining pin subassembly. The retaining pin subassembly can achieve cartridge alignment and tissue retention during the firing of the stapler and protect tissue from unintended damage.