Message ID | 219d1e97b57e8817b4c097246bc8895a304e1635.1380646183.git.joseph.salisbury@canonical.com |
---|---|
State | New |
Headers | show |
On Wed, Oct 02, 2013 at 10:47:25AM -0400, Joseph Salisbury wrote: > BugLink: http://bugs.launchpad.net/bugs/1218004 > > This reverts commit b1a1442a23776756b254b69786848a94d92445ba. > --- > drivers/hid/hid-core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c > index 5956445..d790025 100644 > --- a/drivers/hid/hid-core.c > +++ b/drivers/hid/hid-core.c > @@ -1302,7 +1302,7 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i > > if (hdrv && hdrv->raw_event && hid_match_report(hid, report)) { > ret = hdrv->raw_event(hid, report, data, size); > - if (ret < 0) { > + if (ret != 0) { > ret = ret < 0 ? ret : 0; > goto unlock; > } Obviously testable. Reported to fix the issue. Acked-by: Andy Whitcroft <apw@canonical.com> -apw
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 5956445..d790025 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1302,7 +1302,7 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i if (hdrv && hdrv->raw_event && hid_match_report(hid, report)) { ret = hdrv->raw_event(hid, report, data, size); - if (ret < 0) { + if (ret != 0) { ret = ret < 0 ? ret : 0; goto unlock; }