mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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 <[email protected]> [[email protected]: minor change to check ret < 0] Signed-off-by: Amir Vajid <[email protected]>
This commit is contained in:
parent
2526ddbdbe
commit
5310a38087
1 changed files with 3 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2015-2018, 2019, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "mem_lat: " fmt
|
||||
|
|
@ -182,7 +182,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 < 0)
|
||||
goto err_start;
|
||||
|
||||
ret = sysfs_create_group(&df->dev.kobj, node->attr_grp);
|
||||
|
|
|
|||
Loading…
Reference in a new issue