Iker Casillas has been told that he could miss the next three months after fracturing his left hand.
Miguel del Cerro, who performed the operation, told AS.com: "The operation has gone very well. He will be out for between eight to 12 weeks."
Real's medical chief added: "Everything has been phenomenal. Two screws were put in and the hand has been perfect. It has been a complete success from a surgical point of view."
The 31-year-old will miss his team's Copa semi-final against Barcelona and a Champions League tie with Manchester United, as well as a number of league games.
Antonio Adan is expected to take over in goal, having started a number of games for the La Liga champions recently.