Loading drivers/input/misc/qti-haptics.c +9 −9 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2018-2021, The Linux Foundation. All rights reserved. */ #include <linux/debugfs.h> Loading Loading @@ -1687,11 +1687,11 @@ static ssize_t brake_pattern_dbgfs_write(struct file *filep, { struct qti_hap_effect *effect = (struct qti_hap_effect *)filep->private_data; char *kbuf, *token; char *kbuf, *str, *token; int rc = 0, i = 0, j; u32 val; kbuf = kmalloc(count + 1, GFP_KERNEL); kbuf = kzalloc(count + 1, GFP_KERNEL); if (!kbuf) return -ENOMEM; Loading @@ -1703,8 +1703,8 @@ static ssize_t brake_pattern_dbgfs_write(struct file *filep, kbuf[count] = '\0'; *ppos += count; while ((token = strsep(&kbuf, " ")) != NULL) { str = kbuf; while ((token = strsep(&str, " ")) != NULL) { rc = kstrtouint(token, 0, &val); if (rc < 0) { rc = -EINVAL; Loading Loading @@ -1770,11 +1770,11 @@ static ssize_t pattern_dbgfs_write(struct file *filep, { struct qti_hap_effect *effect = (struct qti_hap_effect *)filep->private_data; char *kbuf, *token; char *kbuf, *str, *token; int rc = 0, i = 0, j; u32 val; kbuf = kmalloc(count + 1, GFP_KERNEL); kbuf = kzalloc(count + 1, GFP_KERNEL); if (!kbuf) return -ENOMEM; Loading @@ -1786,8 +1786,8 @@ static ssize_t pattern_dbgfs_write(struct file *filep, kbuf[count] = '\0'; *ppos += count; while ((token = strsep(&kbuf, " ")) != NULL) { str = kbuf; while ((token = strsep(&str, " ")) != NULL) { rc = kstrtouint(token, 0, &val); if (rc < 0) { rc = -EINVAL; Loading Loading
drivers/input/misc/qti-haptics.c +9 −9 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2018-2021, The Linux Foundation. All rights reserved. */ #include <linux/debugfs.h> Loading Loading @@ -1687,11 +1687,11 @@ static ssize_t brake_pattern_dbgfs_write(struct file *filep, { struct qti_hap_effect *effect = (struct qti_hap_effect *)filep->private_data; char *kbuf, *token; char *kbuf, *str, *token; int rc = 0, i = 0, j; u32 val; kbuf = kmalloc(count + 1, GFP_KERNEL); kbuf = kzalloc(count + 1, GFP_KERNEL); if (!kbuf) return -ENOMEM; Loading @@ -1703,8 +1703,8 @@ static ssize_t brake_pattern_dbgfs_write(struct file *filep, kbuf[count] = '\0'; *ppos += count; while ((token = strsep(&kbuf, " ")) != NULL) { str = kbuf; while ((token = strsep(&str, " ")) != NULL) { rc = kstrtouint(token, 0, &val); if (rc < 0) { rc = -EINVAL; Loading Loading @@ -1770,11 +1770,11 @@ static ssize_t pattern_dbgfs_write(struct file *filep, { struct qti_hap_effect *effect = (struct qti_hap_effect *)filep->private_data; char *kbuf, *token; char *kbuf, *str, *token; int rc = 0, i = 0, j; u32 val; kbuf = kmalloc(count + 1, GFP_KERNEL); kbuf = kzalloc(count + 1, GFP_KERNEL); if (!kbuf) return -ENOMEM; Loading @@ -1786,8 +1786,8 @@ static ssize_t pattern_dbgfs_write(struct file *filep, kbuf[count] = '\0'; *ppos += count; while ((token = strsep(&kbuf, " ")) != NULL) { str = kbuf; while ((token = strsep(&str, " ")) != NULL) { rc = kstrtouint(token, 0, &val); if (rc < 0) { rc = -EINVAL; Loading