diff options
author | Todd Poynor <toddpoynor@google.com> | 2015-12-30 15:13:41 -0800 |
---|---|---|
committer | Todd Poynor <toddpoynor@google.com> | 2015-12-30 15:24:03 -0800 |
commit | 25b4eaed8abee8c8919e6c09d71a6dd94e8c2b3c (patch) | |
tree | befda76f36128fcffca98f15c49f9884c412217f | |
parent | b91bdde5037071a502082607fafde238c53693a1 (diff) | |
download | qcom-msm-v3.10-25b4eaed8abee8c8919e6c09d71a6dd94e8c2b3c.tar.gz |
BRILLO: usb: gadget: fs: Fix and cleanup error messages
Driver got in a state where it prints messages of form:
More data(-75) recieved than intended length(7)
Print the message before setting the same ret variable to -EOVERFLOW, in
order to print the proper number of bytes received.
Also fix typos.
These messages are codeaurora extensions to the driver, introduced in
commit 2e020cf3c8af0d0ccaae60c25c07a72b747cb837, and are not upstream.
Bug: None
Change-Id: Id3c1217215d60d0b4035b41177182cd53779b404
-rw-r--r-- | drivers/usb/gadget/f_fs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c index 6a5fb202cbe..85b96da059a 100644 --- a/drivers/usb/gadget/f_fs.c +++ b/drivers/usb/gadget/f_fs.c @@ -922,12 +922,12 @@ first_try: spin_unlock_irq(&epfile->ffs->eps_lock); if (read && ret > 0) { if (len != MAX_BUF_LEN && ret < len) - pr_err("less data(%zd) recieved than intended length(%zu)\n", + pr_err("less data(%zd) received than intended length(%zu)\n", ret, len); if (ret > len) { - ret = -EOVERFLOW; - pr_err("More data(%zd) recieved than intended length(%zu)\n", + pr_err("More data(%zd) received than intended length(%zu)\n", ret, len); + ret = -EOVERFLOW; } else if (unlikely(copy_to_user( buf, data, ret))) { pr_err("Fail to copy to user len:%zd\n", |