From b853a0682a27987f19106eb5fe011fa1e40cddd8 Mon Sep 17 00:00:00 2001 From: Avaneesh Kumar Dwivedi Date: Tue, 2 Feb 2016 19:36:04 +0530 Subject: [PATCH] soc: qcom: Avoid double free of inrush current mitigation driver Adding default case to handle other events which might be triggered from modem and adsp schdule free_resource work item when already it has been freed. Change-Id: Ibe6a8eae31d70e80fada3a1fc18f8f2bee42dbda Signed-off-by: Avaneesh Kumar Dwivedi --- drivers/soc/qcom/inrush-current-mitigation.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/soc/qcom/inrush-current-mitigation.c b/drivers/soc/qcom/inrush-current-mitigation.c index 9ffa4779a9c6..5f141fc9957f 100644 --- a/drivers/soc/qcom/inrush-current-mitigation.c +++ b/drivers/soc/qcom/inrush-current-mitigation.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, The Linux Foundation. All rights reserved. + * Copyright (c) 2015-2016, 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 @@ -75,6 +75,8 @@ static int mitigate_inrush_notifier_cb(struct notifier_block *nb, subsys->booted = true; drv_data->subsys_boot_count++; break; + default: + return NOTIFY_DONE; } /*