diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2019-09-10 23:41:46 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-09-10 23:41:46 -0700 |
| commit | ffc3c271c99d14878839caeedeeef152a27c13ea (patch) | |
| tree | ed0397ff88170e4d253518115f7f86b1c6653ccd | |
| parent | b2c10286f7e3250fbb1473c28d1a7fd40e091d37 (diff) | |
| parent | 13891703ff242bf93d3112c1fb368fa1207ffe57 (diff) | |
Merge "rtac: add NULL pointer check for asm handle"
| -rw-r--r-- | sound/soc/msm/qdsp6v2/rtac.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/msm/qdsp6v2/rtac.c b/sound/soc/msm/qdsp6v2/rtac.c index 0a331716bab9..5572a3dfadc1 100644 --- a/sound/soc/msm/qdsp6v2/rtac.c +++ b/sound/soc/msm/qdsp6v2/rtac.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -962,7 +962,8 @@ void rtac_set_asm_handle(u32 session_id, void *handle) pr_debug("%s\n", __func__); mutex_lock(&rtac_asm_apr_mutex); - rtac_asm_apr_data[session_id].apr_handle = handle; + if (rtac_asm_apr_data[session_id].apr_handle) + rtac_asm_apr_data[session_id].apr_handle = handle; mutex_unlock(&rtac_asm_apr_mutex); } |
