浏览代码

[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 12 年前
父节点
当前提交
1ac62b914e
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3
    0
      src/drivers/infiniband/qib7322.c

+ 3
- 0
src/drivers/infiniband/qib7322.c 查看文件

@@ -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,

正在加载...
取消
保存