linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers/ata/sata_via.c - Eliminate "may be used uninitialized" warning
@ 2008-04-06 21:45 Joe Perches
  2008-04-06 21:50 ` Adrian Bunk
  0 siblings, 1 reply; 4+ messages in thread
From: Joe Perches @ 2008-04-06 21:45 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linux-ide, LKML

Called by svia_init_one with a temporary,
so there's no effective code change.

Signed-off-by: Joe Perches <joe@perches.com>

 drivers/ata/sata_via.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c
index 0d03f44..e01d2b1 100644
--- a/drivers/ata/sata_via.c
+++ b/drivers/ata/sata_via.c
@@ -406,10 +406,9 @@ static int vt6420_prepare_host(struct pci_dev *pdev, struct ata_host **r_host)
 	struct ata_host *host;
 	int rc;
 
-	rc = ata_pci_prepare_sff_host(pdev, ppi, &host);
+	rc = ata_pci_prepare_sff_host(pdev, ppi, r_host);
 	if (rc)
 		return rc;
-	*r_host = host;
 
 	rc = pcim_iomap_regions(pdev, 1 << 5, DRV_NAME);
 	if (rc) {
@@ -417,6 +416,7 @@ static int vt6420_prepare_host(struct pci_dev *pdev, struct ata_host **r_host)
 		return rc;
 	}
 
+	host = *r_host;
 	host->ports[0]->ioaddr.scr_addr = svia_scr_addr(host->iomap[5], 0);
 	host->ports[1]->ioaddr.scr_addr = svia_scr_addr(host->iomap[5], 1);
 



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

end of thread, other threads:[~2008-04-07  7:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-06 21:45 [PATCH] drivers/ata/sata_via.c - Eliminate "may be used uninitialized" warning Joe Perches
2008-04-06 21:50 ` Adrian Bunk
2008-04-06 22:00   ` Joe Perches
2008-04-07  7:53     ` Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).