Re: [linux-usb-devel] Re: [PATCH] Adaptec USBXchange and USB2Xchange support

From: René Rebe
Date: Mon Jan 30 2006 - 10:35:21 EST


Hi,

On Monday 30 January 2006 16:22, Oliver Neukum wrote:
> Am Montag, 30. Januar 2006 14:22 schrieb René Rebe:
> > +       /* Stop CPU */
> > +       err = usbxchange_set_reset(dev, cpureg, 1);
> > +       err = usbxchange_set_reset(dev, cpureg, 1);
> > +       if (err < 0) {
> > +               printk(KERN_ERR "%s - error stopping dongle CPU: error = %d\n",
> > +                      __FUNCTION__, err);
> > +               return err;
> > +       }
>
> [..]
>
> > +       /* De-assert reset (let the CPU run) */
> > +       err = usbxchange_set_reset(dev, cpureg, 1);
> > +       err = usbxchange_set_reset(dev, cpureg, 0);
> > +       if (err < 0) {
> > +               printk(KERN_ERR "%s - error resetting dongle CPU: error = %d\n",
> > +                      __FUNCTION__, err);
> > +               return err;
> > +       }
>
> Do you really want to ignore errors the first usbxchange_set_reset()s return?

It is not really likely that the first one fails and the second succeeds. But yes,
I could add an if (err == 0) before the 2nd send and skip it when the first already
failed.

I can resent with more suggestions accumulated.

Yours,

--
René Rebe - Rubensstr. 64 - 12157 Berlin (Europe / Germany)
http://www.exactcode.de | http://www.t2-project.org
+49 (0)30 255 897 45
-
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/