Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5160078f authored by Santosh Mardi's avatar Santosh Mardi
Browse files

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: default avatarSantosh Mardi <gsantosh@codeaurora.org>
parent 01e3405d
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
/*
/*
 * 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
 * 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
@@ -195,7 +195,8 @@ static int gov_start(struct devfreq *df)
	node->orig_data = df->data;
	node->orig_data = df->data;
	df->data = node;
	df->data = node;


	if (start_monitor(df))
	ret = start_monitor(df);
	if (ret)
		goto err_start;
		goto err_start;


	ret = sysfs_create_group(&df->dev.kobj, node->attr_grp);
	ret = sysfs_create_group(&df->dev.kobj, node->attr_grp);