Loading drivers/usb/dwc3/debugfs.c +4 −6 Original line number Diff line number Diff line Loading @@ -402,7 +402,7 @@ static ssize_t dwc3_mode_write(struct file *file, struct dwc3 *dwc = s->private; unsigned long flags; u32 mode = 0; char buf[32]; char buf[32] = {0}; if (copy_from_user(&buf, ubuf, min_t(size_t, sizeof(buf) - 1, count))) return -EFAULT; Loading Loading @@ -482,7 +482,7 @@ static ssize_t dwc3_testmode_write(struct file *file, struct dwc3 *dwc = s->private; unsigned long flags; u32 testmode = 0; char buf[32]; char buf[32] = {0}; if (copy_from_user(&buf, ubuf, min_t(size_t, sizeof(buf) - 1, count))) return -EFAULT; Loading Loading @@ -589,7 +589,7 @@ static ssize_t dwc3_link_state_write(struct file *file, struct dwc3 *dwc = s->private; unsigned long flags; enum dwc3_link_state state = 0; char buf[32]; char buf[32] = {0}; if (copy_from_user(&buf, ubuf, min_t(size_t, sizeof(buf) - 1, count))) return -EFAULT; Loading Loading @@ -630,12 +630,10 @@ static ssize_t dwc3_store_ep_num(struct file *file, const char __user *ubuf, { struct seq_file *s = file->private_data; struct dwc3 *dwc = s->private; char kbuf[10]; char kbuf[10] = {0}; unsigned int num, dir, temp; unsigned long flags; memset(kbuf, 0, 10); if (copy_from_user(kbuf, ubuf, count > 10 ? 10 : count)) return -EFAULT; Loading Loading
drivers/usb/dwc3/debugfs.c +4 −6 Original line number Diff line number Diff line Loading @@ -402,7 +402,7 @@ static ssize_t dwc3_mode_write(struct file *file, struct dwc3 *dwc = s->private; unsigned long flags; u32 mode = 0; char buf[32]; char buf[32] = {0}; if (copy_from_user(&buf, ubuf, min_t(size_t, sizeof(buf) - 1, count))) return -EFAULT; Loading Loading @@ -482,7 +482,7 @@ static ssize_t dwc3_testmode_write(struct file *file, struct dwc3 *dwc = s->private; unsigned long flags; u32 testmode = 0; char buf[32]; char buf[32] = {0}; if (copy_from_user(&buf, ubuf, min_t(size_t, sizeof(buf) - 1, count))) return -EFAULT; Loading Loading @@ -589,7 +589,7 @@ static ssize_t dwc3_link_state_write(struct file *file, struct dwc3 *dwc = s->private; unsigned long flags; enum dwc3_link_state state = 0; char buf[32]; char buf[32] = {0}; if (copy_from_user(&buf, ubuf, min_t(size_t, sizeof(buf) - 1, count))) return -EFAULT; Loading Loading @@ -630,12 +630,10 @@ static ssize_t dwc3_store_ep_num(struct file *file, const char __user *ubuf, { struct seq_file *s = file->private_data; struct dwc3 *dwc = s->private; char kbuf[10]; char kbuf[10] = {0}; unsigned int num, dir, temp; unsigned long flags; memset(kbuf, 0, 10); if (copy_from_user(kbuf, ubuf, count > 10 ? 10 : count)) return -EFAULT; Loading