As reported to the FAA. Reports are unverified, and codes are left as the FAA publishes them.
What was found
AFTER TAKEOFF, FLAPS STUCK AT 17 DEGREES. THE CAPTAIN RETURNED TO FIELD AND DECLARED AN EMERGENCY. ACFT LANDED AND FLAPS RETRACTED TO ZERO WITH NO FURTHER INCIDENT. REMOVED AND REPLACED RT FLAP SAFETY SWITCH LINKS AND BUSHINGS. OPS CK NORMAL.