Merge "rtac: add NULL pointer check for asm handle"

This commit is contained in:
Linux Build Service Account 2019-09-10 23:41:46 -07:00 committed by Gerrit - the friendly Code Review server
commit ffc3c271c9

View file

@ -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 * 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 * 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__); pr_debug("%s\n", __func__);
mutex_lock(&rtac_asm_apr_mutex); 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); mutex_unlock(&rtac_asm_apr_mutex);
} }