From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Sun, 21 Sep 2014 22:01:36 +0200 Subject: [U-Boot] [PATCH 2/7] usb: ehci: Move interrupt packet length check to create_int_queue In-Reply-To: References: <1411225272-13793-1-git-send-email-hdegoede@redhat.com> <201409212136.48894.marex@denx.de> Message-ID: <201409212201.36240.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sunday, September 21, 2014 at 10:00:24 PM, Michael Trimarchi wrote: > Hi Marek > > On Sun, Sep 21, 2014 at 9:36 PM, Marek Vasut wrote: > > On Sunday, September 21, 2014 at 07:53:35 PM, Hans de Goede wrote: > >> Hi, > > > > [...] > > > >> >> - if (length > usb_maxpacket(dev, pipe)) { > >> >> - printf("%s: Interrupt transfers requiring several " > >> >> - "transactions are not supported.\n", > >> >> __func__); - return -1; > >> >> - } > >> >> - > >> >> > >> >> queue = create_int_queue(dev, pipe, 1, length, buffer); > >> >> > >> >> + if (!queue) > >> >> + return -1; > >> > > >> > Can you return a more consistent error code? > >> > >> I'm just moving code around, and returning the same error code as > >> before. Surely changing the error code belongs in another patch ? > > > > Yes, full ACK. This is exactly a prime examply where squashing two fixes > > into one patch would break bisectability absolutely perfectly. > > Agree on separated patch, I have just ask if Hans can do in the > patches queue. Marek, thanks for the lesson. Anyway seems that in USB > part we have already several -1 return. You know how it goes, patches are welcome ;-) Best regards, Marek Vasut