Loading drivers/usb/dwc3/debugfs.c +13 −5 Original line number Diff line number Diff line Loading @@ -897,21 +897,30 @@ void dwc3_dbg_print_reg(struct dwc3 *dwc, const char *name, int reg) static ssize_t dwc3_store_int_events(struct file *file, const char __user *ubuf, size_t count, loff_t *ppos) { int clear_stats, i; int i, ret; unsigned long flags; struct seq_file *s = file->private_data; struct dwc3 *dwc = s->private; struct dwc3_ep *dep; struct timespec ts; u8 clear_stats; if (ubuf == NULL) { pr_err("[%s] EINVAL\n", __func__); goto done; ret = -EINVAL; return ret; } if (sscanf(ubuf, "%u", &clear_stats) != 1 || clear_stats != 0) { ret = kstrtou8_from_user(ubuf, count, 0, &clear_stats); if (ret < 0) { pr_err("can't get enter value.\n"); return ret; } if (clear_stats != 0) { pr_err("Wrong value. To clear stats, enter value as 0.\n"); goto done; ret = -EINVAL; return ret; } spin_lock_irqsave(&dwc->lock, flags); Loading @@ -928,7 +937,6 @@ static ssize_t dwc3_store_int_events(struct file *file, spin_unlock_irqrestore(&dwc->lock, flags); done: return count; } Loading Loading
drivers/usb/dwc3/debugfs.c +13 −5 Original line number Diff line number Diff line Loading @@ -897,21 +897,30 @@ void dwc3_dbg_print_reg(struct dwc3 *dwc, const char *name, int reg) static ssize_t dwc3_store_int_events(struct file *file, const char __user *ubuf, size_t count, loff_t *ppos) { int clear_stats, i; int i, ret; unsigned long flags; struct seq_file *s = file->private_data; struct dwc3 *dwc = s->private; struct dwc3_ep *dep; struct timespec ts; u8 clear_stats; if (ubuf == NULL) { pr_err("[%s] EINVAL\n", __func__); goto done; ret = -EINVAL; return ret; } if (sscanf(ubuf, "%u", &clear_stats) != 1 || clear_stats != 0) { ret = kstrtou8_from_user(ubuf, count, 0, &clear_stats); if (ret < 0) { pr_err("can't get enter value.\n"); return ret; } if (clear_stats != 0) { pr_err("Wrong value. To clear stats, enter value as 0.\n"); goto done; ret = -EINVAL; return ret; } spin_lock_irqsave(&dwc->lock, flags); Loading @@ -928,7 +937,6 @@ static ssize_t dwc3_store_int_events(struct file *file, spin_unlock_irqrestore(&dwc->lock, flags); done: return count; } Loading