MFC r308692:
Fix ti_gpio_detach() to avoid crashing if something goes wrong.
Sponsored by: Rubicon Communication, LLC (Netgate)