adi_v5_jtag: add missing error handling