Some degree of erectile dysfunction usually occurs right after surgery to remove the prostate, regardless of whether the technique is performed that tries to spare the nerve that controls erections.
The severity of the erectile dysfunction depends on the type of surgery, stage of cancer, and skill of the surgeon.