[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140611173416.GJ10256@localhost>
Date: Wed, 11 Jun 2014 19:34:16 +0200
From: Johan Hovold <johan@...nel.org>
To: Janne Kanniainen <janne.kanniainen@...il.com>
Cc: jkosina@...e.cz, cooloney@...il.com, linux-kernel@...r.kernel.org,
linux-leds@...r.kernel.org, linux-usb@...r.kernel.org,
linux-input@...r.kernel.org, johan@...nel.org
Subject: Re: [PATCH v3] leds: USB: HID: Add support for MSI GT683R led panels
On Wed, Jun 11, 2014 at 04:05:42PM +0200, Johan Hovold wrote:
>
On Wed, Jun 11, 2014 at 12:21:39AM +0300, Janne Kanniainen wrote:
> > +static int gt683r_led_snd_msg(struct gt683r_led *led, char *msg)
> > +{
> > + int ret;
> > +
> > + ret = hid_hw_raw_request(led->hdev, 0x01, msg, GT683R_BUFFER_SIZE,
> > + HID_FEATURE_REPORT, HID_REQ_SET_REPORT);
> > + if (ret < 0) {
> > + hid_err(led->hdev,
> > + "failed to send set report request: %i\n", ret);
And here's one more: You need to check if ret != GT683R_BUFFER_SIZE and
make sure to return an error (e.g. -EIO) even if ret >= 0 in that case.
> > + return ret;
> > + }
> > +
> > + return 0;
> > +}
Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists