Legal battles over Facebook Inc.’s initial public offering continue to dog the social media company and its bankers, which tried and failed to escape a consolidated securities class action over the IPO in December. But Davis Polk & Wardwell chipped away at the litigation on Friday, defeating an investor lawsuit alleging that Facebook’s underwriters improperly earned $100 million in so-called short-swing profits.

U.S. District Judge Robert Sweet in Manhattan ruled that the underwriters—Morgan Stanley & Co., JPMorgan Chase & Co. and Goldman Sachs & Co.—don’t need to disgorge profits earned by quickly buying and selling Facebook stock in the months after the May 2012 IPO.