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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux