From: Wolfgang Denk Date: Thu, 09 Oct 2008 20:42:06 +0200 Subject: [U-Boot] [patch 1/2] fix USB initialisation procedure In-Reply-To: <20081009144357.GA27523@lisa> References: <20081008085413.978543174@bohmer.net>> <20081008091415.451775709@bohmer.net> <20081009121044.GA25278@game.jcrosoft.org> <20081009131922.958CF832E428@gemini.denx.de> <20081009144357.GA27523@lisa> Message-ID: <20081009184206.CDAB1832E428@gemini.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 Dear Markus =?iso-8859-1?Q?Klotzb=FCcher?=, In message <20081009144357.GA27523@lisa> you wrote: > > > > > if (dev->status == 0) > > > > return dev->act_len; > > > please add {}?to if too or remove the else > > > > - else > > > > + else { > > > > + /* Let's wait a while for the timeout to elaps. > > > > + * it has no real use, but it keeps the interface happy. */ > > > > + wait_ms(timeout); > > > > return -1; > > > > + } ... > > Actually the "else" should be removed. > > How so? Like that: if (dev->status == 0) return dev->act_len; /* * Let's wait a while for the timeout to elaps. * it has no real use, but it keeps the interface happy. */ wait_ms(timeout); return -1; What exactly was your problem? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Very ugly or very beautiful women should be flattered on their understanding, and mediocre ones on their beauty. -- Philip Earl of Chesterfield