[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210627003937.6249-1-yang.shunyong@gmail.com>
Date: Sun, 27 Jun 2021 08:39:37 +0800
From: Shunyong Yang <yang.shunyong@...il.com>
To: kishon@...com, lorenzo.pieralisi@....com, kw@...ux.com
Cc: bhelgaas@...gle.com, linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org,
Shunyong Yang <yang.shunyong@...il.com>
Subject: [PATCH] tools: PCI: Zero-initialize param
The values in param may be random if they are not initialized, which
may cause use_dma flag set even when "-d" option is not provided
in command line. Initializing all members to 0 to solve this.
Signed-off-by: Shunyong Yang <yang.shunyong@...il.com>
---
tools/pci/pcitest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/pci/pcitest.c b/tools/pci/pcitest.c
index 0a1344c45213..59bcd6220a58 100644
--- a/tools/pci/pcitest.c
+++ b/tools/pci/pcitest.c
@@ -40,7 +40,7 @@ struct pci_test {
static int run_test(struct pci_test *test)
{
- struct pci_endpoint_test_xfer_param param;
+ struct pci_endpoint_test_xfer_param param = {0};
int ret = -EINVAL;
int fd;
--
2.17.1
Powered by blists - more mailing lists