Browse Source

[qib7322] Fix compiler warning on gcc 4.7

Originally-fixed-by: Christian Hesse <list@eworm.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 11 years ago
parent
commit
1ac62b914e
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      src/drivers/infiniband/qib7322.c

+ 3
- 0
src/drivers/infiniband/qib7322.c View File

@@ -2062,6 +2062,9 @@ static int qib7322_ahb_read ( struct qib7322 *qib7322, unsigned int location,
2062 2062
 	struct QIB_7322_ahb_transaction_reg xact;
2063 2063
 	int rc;
2064 2064
 
2065
+	/* Avoid returning uninitialised data on error */
2066
+	*data = 0;
2067
+
2065 2068
 	/* Initiate transaction */
2066 2069
 	memset ( &xact, 0, sizeof ( xact ) );
2067 2070
 	BIT_FILL_2 ( &xact,

Loading…
Cancel
Save