Loading drivers/soc/qcom/msm_performance.c +16 −3 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved. */ #include <linux/init.h> Loading Loading @@ -1009,6 +1009,8 @@ static int init_splh_notif(const char *buf) cp = strnchr(cp, strlen(cp), ':'); /* skip INIT */ cp++; cp = strnchr(cp, strlen(cp), ':'); /* skip nfps */ if (!cp) return -EINVAL; *ptmp++ = nfps; /* nfps is first cmd param */ tmp_valid_len++; Loading @@ -1035,6 +1037,9 @@ static int init_splh_notif(const char *buf) ptmp++; /* increment after storing FPS val */ tmp_valid_len++; cp1 = strnchr(cp1, strlen(cp1), ','); /* move to ,ipc */ if (!cp1) return -EINVAL; for (j = 0; j < 2 * n_ipc_freq_pair; j++) { if (sscanf(cp1, ",%hu", ptmp) != 1) return -EINVAL; Loading @@ -1042,12 +1047,20 @@ static int init_splh_notif(const char *buf) ptmp++; /* increment after storing ipc or freq */ tmp_valid_len++; cp1++; if (j != (2 * n_ipc_freq_pair - 1)) if (j != (2 * n_ipc_freq_pair - 1)) { cp1 = strnchr(cp1, strlen(cp1), ','); /* move to next */ if (!cp1) return -EINVAL; } } if (i != (nfps - 1)) if (i != (nfps - 1)) { cp1 = strnchr(cp1, strlen(cp1), ':'); /* move to next FPS val */ if (!cp1) return -EINVAL; } } } else { Loading Loading
drivers/soc/qcom/msm_performance.c +16 −3 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved. */ #include <linux/init.h> Loading Loading @@ -1009,6 +1009,8 @@ static int init_splh_notif(const char *buf) cp = strnchr(cp, strlen(cp), ':'); /* skip INIT */ cp++; cp = strnchr(cp, strlen(cp), ':'); /* skip nfps */ if (!cp) return -EINVAL; *ptmp++ = nfps; /* nfps is first cmd param */ tmp_valid_len++; Loading @@ -1035,6 +1037,9 @@ static int init_splh_notif(const char *buf) ptmp++; /* increment after storing FPS val */ tmp_valid_len++; cp1 = strnchr(cp1, strlen(cp1), ','); /* move to ,ipc */ if (!cp1) return -EINVAL; for (j = 0; j < 2 * n_ipc_freq_pair; j++) { if (sscanf(cp1, ",%hu", ptmp) != 1) return -EINVAL; Loading @@ -1042,12 +1047,20 @@ static int init_splh_notif(const char *buf) ptmp++; /* increment after storing ipc or freq */ tmp_valid_len++; cp1++; if (j != (2 * n_ipc_freq_pair - 1)) if (j != (2 * n_ipc_freq_pair - 1)) { cp1 = strnchr(cp1, strlen(cp1), ','); /* move to next */ if (!cp1) return -EINVAL; } } if (i != (nfps - 1)) if (i != (nfps - 1)) { cp1 = strnchr(cp1, strlen(cp1), ':'); /* move to next FPS val */ if (!cp1) return -EINVAL; } } } else { Loading