From fc6a9c748dab532faa2fbc2d27eeca169dd7e1ef Mon Sep 17 00:00:00 2001 From: Jonathan Aillet Date: Sat, 9 Jun 2018 18:12:11 +0200 Subject: Return an error when hal attach to mixer fails. Return an error when hal is not successfully attach to mixer. Change-Id: Ibfacf405153e87d8005feba17f963b2f49caad7a Signed-off-by: Jonathan Aillet --- 4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '4a-hal') diff --git a/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c b/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c index 61b0657..58dad10 100644 --- a/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c +++ b/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c @@ -113,8 +113,10 @@ static int HalCtlsInitOneApi(AFB_ApiT apiHandle) currentCtlHalData->status = HAL_STATUS_UNAVAILABLE; else { currentCtlHalData->status = HAL_STATUS_AVAILABLE; - if((err = HalCtlsAttachToMixer(apiHandle))) + if((err = HalCtlsAttachToMixer(apiHandle))) { AFB_ApiError(apiHandle, "%s: Error %i while attaching to mixer", __func__, err); + return -4; + } } // TBD JAI: handle refresh of hal status for dynamic card (/dev/by-id) -- cgit 1.2.3-korg