public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [rfc patch] libertas: fix if_spi_prog_helper_firmware()
@ 2010-08-24 12:07 Dan Carpenter
  2010-08-24 12:15 ` Ben Hutchings
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Dan Carpenter @ 2010-08-24 12:07 UTC (permalink / raw)
  To: Dan Williams
  Cc: John W. Linville, Ben Hutchings, Mike Frysinger, libertas-dev,
	linux-wireless, kernel-janitors

The indenting is not correct here.  I don't have this hardware and I'm
just guessing as to what was intended.  I think that if there is an
error we should return an error code, but if there isn't an error we
should return success directly without releasing the firmware.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c
index fe3f080..123a541 100644
--- a/drivers/net/wireless/libertas/if_spi.c
+++ b/drivers/net/wireless/libertas/if_spi.c
@@ -471,9 +471,12 @@ static int if_spi_prog_helper_firmware(struct if_spi_card *card)
 		goto release_firmware;
 	err = spu_write_u16(card, IF_SPI_CARD_INT_CAUSE_REG,
 				IF_SPI_CIC_CMD_DOWNLOAD_OVER);
+	if (err)
 		goto release_firmware;
 
-	lbs_deb_spi("waiting for helper to boot...\n");
+	lbs_deb_spi("helper firmware loaded...\n");
+
+	return 0;
 
 release_firmware:
 	release_firmware(firmware);

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-08-26 18:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-24 12:07 [rfc patch] libertas: fix if_spi_prog_helper_firmware() Dan Carpenter
2010-08-24 12:15 ` Ben Hutchings
2010-08-26  3:26   ` Colin McCabe
2010-08-26  3:37     ` Ben Hutchings
2010-08-26 17:04       ` Colin McCabe
2010-08-24 12:17 ` Johannes Berg
2010-08-26 15:48 ` Dan Williams
2010-08-26 18:52   ` Paul Fox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox