The ulnar nerve provides sensory function to the pinky and ring finger. It takes its name from the ulna, one of the bones of the forearm, in close proximity and along which the nerve is located.