Re: [PATCH v4 5/5] Add ioctls to enable and disable local controls on an instrument

From: Dave Penkler
Date: Wed Nov 18 2015 - 03:27:53 EST


On Sun, Nov 15, 2015 at 10:10:35PM +0200, Andy Shevchenko wrote:
> On Sun, Nov 15, 2015 at 8:40 PM, Dave Penkler <dpenkler@xxxxxxxxx> wrote:
> > These ioctls provide support for the USBTMC-USB488 control requests
> > for REN_CONTROL, GO_TO_LOCAL and LOCAL_LOCKOUT
> >
> > +
> > + dev = &data->intf->dev;
>
> Could be assigned above.
>

ok

> > + wValue = (val) ? 1 : 0;
>
> Redundant parens.
>

ok

> > + rv = -EIO;
>
> Hmm??? Does usb_control_msg() return a proper error code? If it does,
> perhaps better to propagate it.
>

You are right.

> > + rv = -EIO;
> > + goto exit;
>
> > + } else {
>
> Redundant else.
>

OK

>
Thanks,
-Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/