ASoC: msm: qdsp6v2: clear address on error

Set address to NULL on error to ensure a stale address is not used.

CRs-Fixed: 2038685
Signed-off-by: Siena Richard <sienar@codeaurora.org>
Change-Id: I17e7b7b404625d21721b2466e70fa8be2370b517
This commit is contained in:
Siena Richard 2017-04-26 11:18:15 -07:00 committed by Gerrit - the friendly Code Review server
parent 9a73e3da51
commit 0a5bf59253

View file

@ -605,7 +605,9 @@ done:
return cal_block; return cal_block;
err: err:
kfree(cal_block->cal_info); kfree(cal_block->cal_info);
cal_block->cal_info = NULL;
kfree(cal_block->client_info); kfree(cal_block->client_info);
cal_block->client_info = NULL;
kfree(cal_block); kfree(cal_block);
cal_block = NULL; cal_block = NULL;
return cal_block; return cal_block;