Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Sep 2013 09:49:12 GMT
From:      zcore@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r257360 - soc2013/zcore/head/usr.sbin/bhyve
Message-ID:  <201309150949.r8F9nClW015257@socsvn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: zcore
Date: Sun Sep 15 09:49:12 2013
New Revision: 257360
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=257360

Log:
  fix used uninitialized

Modified:
  soc2013/zcore/head/usr.sbin/bhyve/pci_ahci.c

Modified: soc2013/zcore/head/usr.sbin/bhyve/pci_ahci.c
==============================================================================
--- soc2013/zcore/head/usr.sbin/bhyve/pci_ahci.c	Sun Sep 15 09:48:50 2013	(r257359)
+++ soc2013/zcore/head/usr.sbin/bhyve/pci_ahci.c	Sun Sep 15 09:49:12 2013	(r257360)
@@ -219,7 +219,7 @@
 		break;
 	default:
 		WPRINTF(("unsupported fis type %d\n", ft));
-		break;
+		return;
 	}
 	memcpy(p->rfis + offset, fis, len);
 	if (irq) {
@@ -1573,8 +1573,10 @@
 		value = pci_ahci_host_read(sc, offset);
 	else if (offset < AHCI_OFFSET + sc->ports * AHCI_STEP)
 		value = pci_ahci_port_read(sc, offset);
-	else
+	else {
+		value = 0;
 		DPRINTF(("pci_ahci: unknown i/o read offset 0x%"PRIx64"\n", offset));
+	}
 
 	pthread_mutex_unlock(&sc->mtx);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309150949.r8F9nClW015257>