From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Fri, 5 Jun 2015 16:08:15 +0200 Subject: [U-Boot] [PATCH] drivers:usb:fsl: Return if USB_MAX_CONTROLLER_COUNT is incorrect In-Reply-To: References: <1431422908-1024-1-git-send-email-nikhil.badola@freescale.com> Message-ID: <201506051608.15182.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 Friday, June 05, 2015 at 06:19:16 AM, Badola Nikhil wrote: > > -----Original Message----- > > From: Nikhil Badola [mailto:nikhil.badola at freescale.com] > > Sent: Tuesday, May 12, 2015 2:58 PM > > To: u-boot at lists.denx.de > > Cc: Badola Nikhil-B46172 > > Subject: [PATCH] drivers:usb:fsl: Return if USB_MAX_CONTROLLER_COUNT Hi, please do me a favor next time -- insert a space after each tag, ie. drivers: usb: fsl: .... > > is incorrect > > > > Return if USB_MAX_CONTROLLER_COUNT hence the index of the controller > > to be initialised is incorrect > > > > Signed-off-by: Nikhil Badola > > --- > > > > drivers/usb/host/ehci-fsl.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c > > index ed83eb4..1973e0b 100644 > > --- a/drivers/usb/host/ehci-fsl.c > > +++ b/drivers/usb/host/ehci-fsl.c > > @@ -76,7 +76,7 @@ int ehci_hcd_init(int index, enum usb_init_type init, > > > > break; > > > > default: > > printf("ERROR: wrong controller index!!\n"); > > > > - break; > > + return -1; Can you please use value from errno.h here , like -EINVAL ? Thanks! Best regards, Marek Vasut