msm_perf: fix warnings to enable msm_perf
Handle error checks in reading attributes. Change-Id: I12b693e469b8a8de21a2bef36c92a012e5a2c034 Signed-off-by: Kishore Sri venkata Ganesh Bolisetty <quic_bsrivenk@quicinc.com> [dereference23: Backport to msm-5.4] Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
This commit is contained in:
parent
04664d5d69
commit
4e24aaf585
1 changed files with 7 additions and 2 deletions
|
|
@ -913,9 +913,14 @@ void msm_perf_events_update(enum evt_update_t update_typ,
|
|||
static int set_game_start_pid(const char *buf, const struct kernel_param *kp)
|
||||
{
|
||||
long usr_val = 0;
|
||||
int ret = strlen(buf);
|
||||
int ret;
|
||||
|
||||
kstrtol(buf, 0, &usr_val);
|
||||
ret = kstrtol(buf, 0, &usr_val);
|
||||
if (ret) {
|
||||
pr_err("msm_perf: kstrtol failed, ret=%d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
ret = strlen(buf);
|
||||
atomic_set(&game_status_pid, usr_val);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue