From 014620f143eda403795642dab116fb82bda54200 Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Mon, 5 Oct 2015 17:21:00 -0700 Subject: SoundTrigger: fix binder call status reporting. Bug: 24677430. Change-Id: Ife9b10e2d1acdb51099b21551e8c191fff7f75b4 --- soundtrigger/ISoundTriggerHwService.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'soundtrigger/ISoundTriggerHwService.cpp') diff --git a/soundtrigger/ISoundTriggerHwService.cpp b/soundtrigger/ISoundTriggerHwService.cpp index e14a771..e37bae3 100644 --- a/soundtrigger/ISoundTriggerHwService.cpp +++ b/soundtrigger/ISoundTriggerHwService.cpp @@ -85,8 +85,11 @@ public: data.writeInterfaceToken(ISoundTriggerHwService::getInterfaceDescriptor()); data.write(&handle, sizeof(sound_trigger_module_handle_t)); data.writeStrongBinder(IInterface::asBinder(client)); - remote()->transact(ATTACH, data, &reply); - status_t status = reply.readInt32(); + status_t status = remote()->transact(ATTACH, data, &reply); + if (status != NO_ERROR) { + return status; + } + status = reply.readInt32(); if (reply.readInt32() != 0) { module = interface_cast(reply.readStrongBinder()); } -- cgit v1.1