Re: [PATCH 1/3] USB: serial: ark3116: fix endpoint-check return value

2017-01-31 Thread Johan Hovold
On Tue, Jan 31, 2017 at 03:35:54PM +0100, Greg Kroah-Hartman wrote:
> On Tue, Jan 31, 2017 at 11:51:07AM +0100, Johan Hovold wrote:
> > Return -ENODEV rather than -EINVAL on probe errors due to a missing
> > endpoint.
> > 
> > Also clean up the endpoint sanity check somewhat and use the interface
> > device for logging a more compact error in case an expected endpoint is
> > missing.
> > 
> > Signed-off-by: Johan Hovold 
> 
> Reviewed-by: Greg Kroah-Hartman 

Thanks for the review. Series now applied.

Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/3] USB: serial: ark3116: fix endpoint-check return value

2017-01-31 Thread Greg KH
On Tue, Jan 31, 2017 at 11:51:07AM +0100, Johan Hovold wrote:
> Return -ENODEV rather than -EINVAL on probe errors due to a missing
> endpoint.
> 
> Also clean up the endpoint sanity check somewhat and use the interface
> device for logging a more compact error in case an expected endpoint is
> missing.
> 
> Signed-off-by: Johan Hovold 


Reviewed-by: Greg Kroah-Hartman 
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/3] USB: serial: ark3116: fix endpoint-check return value

2017-01-31 Thread Johan Hovold
Return -ENODEV rather than -EINVAL on probe errors due to a missing
endpoint.

Also clean up the endpoint sanity check somewhat and use the interface
device for logging a more compact error in case an expected endpoint is
missing.

Signed-off-by: Johan Hovold 
---
 drivers/usb/serial/ark3116.c | 16 +---
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c
index 754fc3e41005..d0fcff20ca7e 100644
--- a/drivers/usb/serial/ark3116.c
+++ b/drivers/usb/serial/ark3116.c
@@ -125,17 +125,11 @@ static inline int calc_divisor(int bps)
 static int ark3116_attach(struct usb_serial *serial)
 {
/* make sure we have our end-points */
-   if ((serial->num_bulk_in == 0) ||
-   (serial->num_bulk_out == 0) ||
-   (serial->num_interrupt_in == 0)) {
-   dev_err(>dev->dev,
-   "%s - missing endpoint - "
-   "bulk in: %d, bulk out: %d, int in %d\n",
-   KBUILD_MODNAME,
-   serial->num_bulk_in,
-   serial->num_bulk_out,
-   serial->num_interrupt_in);
-   return -EINVAL;
+   if (serial->num_bulk_in == 0 ||
+   serial->num_bulk_out == 0 ||
+   serial->num_interrupt_in == 0) {
+   dev_err(>interface->dev, "missing endpoint\n");
+   return -ENODEV;
}
 
return 0;
-- 
2.10.2

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html