diff options
-rw-r--r-- | src/4a-internals-hal/4a-internals-hal-alsacore-link.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/4a-internals-hal/4a-internals-hal-alsacore-link.c b/src/4a-internals-hal/4a-internals-hal-alsacore-link.c index 81e60f9..6cfdfba 100644 --- a/src/4a-internals-hal/4a-internals-hal-alsacore-link.c +++ b/src/4a-internals-hal/4a-internals-hal-alsacore-link.c @@ -291,14 +291,15 @@ int InternalHalUpdateAlsaCtlProperties(afb_api_t apiHandle, char *cardId, struct json_object *returnedDataJ = NULL; + if(! currentAlsaCtl->alsaCtlProperties) { + AFB_API_ERROR(apiHandle, "Data structure to store alsa control properties is not allocated"); + return -8; + } + err = InternalHalGetAlsaCtlInfo(apiHandle, cardId, currentAlsaCtl, &returnedDataJ); if(err) { return err; } - else if(! currentAlsaCtl->alsaCtlProperties) { - AFB_API_ERROR(apiHandle, "Data structure to store alsa control properties is not allocated"); - err = -9; - } // TBD JAI : get dblinear/dbminmax/... values else if(wrap_json_unpack(returnedDataJ, "{s:i s:s s:{s?:i s?:i s?:i s?:i s?:i}}", |