From 5160078f94e86b33f0724537017a2076cdc32a67 Mon Sep 17 00:00:00 2001 From: Santosh Mardi Date: Thu, 3 Jan 2019 10:52:14 +0530 Subject: [PATCH] devfreq: return error code when governor start fails If there is a failure in starting hw monitor required for memlat governor, return the error code to devfreq framework so that the framework will make sure the governor is switched back to previous governor. Change-Id: I76705725fc8b94d5341b1b8af7c1bd2b79e7642a Signed-off-by: Santosh Mardi --- drivers/devfreq/governor_memlat.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/devfreq/governor_memlat.c b/drivers/devfreq/governor_memlat.c index 409154e770f2..50c66252ba78 100644 --- a/drivers/devfreq/governor_memlat.c +++ b/drivers/devfreq/governor_memlat.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. + * Copyright (c) 2015-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 @@ -195,7 +195,8 @@ static int gov_start(struct devfreq *df) node->orig_data = df->data; df->data = node; - if (start_monitor(df)) + ret = start_monitor(df); + if (ret) goto err_start; ret = sysfs_create_group(&df->dev.kobj, node->attr_grp);