mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
soc: qcom: qsee_ipc_irq_bridge: Remove redundant cleanup
qiib_cleanup in qiib_driver_data_deinit is redundant since this cleanup is already done in driver remove. Remove qiib_cleanup in deinit and add required NULL check to avoid any use-after-free scenario. Change-Id: I95fa3cf91b5ca6cbaeb66d304a0572ba1d294a69 Signed-off-by: Arun Prakash <quic_app@quicinc.com>
This commit is contained in:
parent
f3351f4a4a
commit
0331251e02
1 changed files with 3 additions and 2 deletions
|
|
@ -125,7 +125,6 @@ static int qiib_driver_data_init(void)
|
|||
*/
|
||||
static void qiib_driver_data_deinit(void)
|
||||
{
|
||||
qiib_cleanup();
|
||||
if (!qiib_info->log_ctx)
|
||||
ipc_log_context_destroy(qiib_info->log_ctx);
|
||||
kfree(qiib_info);
|
||||
|
|
@ -433,8 +432,10 @@ static void qiib_cleanup(void)
|
|||
}
|
||||
mutex_unlock(&qiib_info->list_lock);
|
||||
|
||||
if (!IS_ERR_OR_NULL(qiib_info->classp))
|
||||
if (!IS_ERR_OR_NULL(qiib_info->classp)) {
|
||||
class_destroy(qiib_info->classp);
|
||||
qiib_info->classp = NULL;
|
||||
}
|
||||
|
||||
unregister_chrdev_region(MAJOR(qiib_info->dev_num), qiib_info->nports);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue