From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: frank zago <frank@zago.net>
Cc: linux-kernel@vger.kernel.org,
Jan-Niklas Burfeind <kernel@aiyionpri.me>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
Wolfram Sang <wsa@kernel.org>, Johan Hovold <johan@kernel.org>,
linux-usb@vger.kernel.org, gunar@schorcht.net,
Lee Jones <lee.jones@linaro.org>
Subject: Re: [PATCH v3] mfd: ch341: add driver for the WCH CH341 in I2C/GPIO mode
Date: Tue, 15 Mar 2022 15:30:21 +0100 [thread overview]
Message-ID: <YjCi/cRY51tYUowD@kroah.com> (raw)
In-Reply-To: <20220314030937.22762-1-frank@zago.net>
On Sun, Mar 13, 2022 at 10:09:37PM -0500, frank zago wrote:
> +static int ch341_usb_probe(struct usb_interface *iface,
> + const struct usb_device_id *usb_id)
> +{
> + struct usb_host_endpoint *endpoints;
> + struct ch341_device *dev;
> + int rc;
> +
> + dev = kzalloc(sizeof(struct ch341_device), GFP_KERNEL);
> + if (!dev)
> + return -ENOMEM;
> +
> + dev->usb_dev = usb_get_dev(interface_to_usbdev(iface));
> + dev->iface = iface;
> + mutex_init(&dev->usb_lock);
> +
> + if (iface->cur_altsetting->desc.bNumEndpoints != 3) {
> + rc = -EIO;
-ENODEV is the proper one here.
> + goto free_dev;
> + }
> +
> + endpoints = iface->cur_altsetting->endpoint;
> + if (!usb_endpoint_is_bulk_in(&endpoints[0].desc) ||
> + !usb_endpoint_is_bulk_out(&endpoints[1].desc) ||
> + !usb_endpoint_xfer_int(&endpoints[2].desc)) {
> + rc = -EIO;
Same here.
thanks,
greg k-h
next prev parent reply other threads:[~2022-03-15 14:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-14 3:09 [PATCH v3] mfd: ch341: add driver for the WCH CH341 in I2C/GPIO mode frank zago
2022-03-14 15:52 ` kernel test robot
2022-03-14 20:18 ` kernel test robot
2022-03-15 14:30 ` Greg Kroah-Hartman [this message]
2022-03-15 14:58 ` Lee Jones
2022-03-16 3:48 ` Frank Zago
2022-03-16 7:29 ` Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YjCi/cRY51tYUowD@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=bgolaszewski@baylibre.com \
--cc=frank@zago.net \
--cc=gunar@schorcht.net \
--cc=johan@kernel.org \
--cc=kernel@aiyionpri.me \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=wsa@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).