From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Wed, 11 Nov 2009 10:16:48 -0500 Subject: [U-Boot] [PATCH 1/5] smc911x: return -1 when initialization fails In-Reply-To: <0a5257332d4a928fa67e2ee9108839126bf88b0a.1257861401.git.mike@compulab.co.il> References: <0a5257332d4a928fa67e2ee9108839126bf88b0a.1257861401.git.mike@compulab.co.il> Message-ID: <200911111016.49241.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wednesday 11 November 2009 03:03:00 Mike Rapoport wrote: > --- a/drivers/net/smc911x.c > +++ b/drivers/net/smc911x.c > @@ -243,7 +243,7 @@ > dev = malloc(sizeof(*dev)); > if (!dev) { > free(dev); > - return 0; > + return -1; > } this is correct as this is an error > @@ -252,7 +252,7 @@ > /* Try to detect chip. Will fail if not present. */ > if (smc911x_detect_chip(dev)) { > free(dev); > - return 0; > + return -1; > } this is not -- we want it to return 0 if no parts are found. see recent net doc updates and discussions. -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20091111/032d095f/attachment.pgp