[automerger skipped] tryRegistrationImpl: better error checking am: 3eec5b9bee -s ours

am skip reason: Change-Id Ia451fa1b06c49def0fe8b3a3558af83fff18ec96 with SHA-1 d682c0e34c is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/libhidl/+/12226148

Change-Id: I86ff8db18859a174bcb14f4b1eae8891c8acbc0a