The U.S. Court of Appeals for the Second Circuit on Wednesday upheld the dismissal of CVR Energy Inc.’s legal malpractice suit against Wachtell, Lipton, Rosen & Katz stemming from Carl Icahn’s takeover of the oil and gas refiner in 2012.

A three-judge panel of the federal appeals court agreed that the lawsuit, which targeted Wachtell with allegations of “unusual” contracts with two investment banks hired to help ward off Icahn’s move, failed to adequately lay out a case that the Midtown Manhattan firm had been negligent in its professional representation.