d2d: unlock before return etc