summaryrefslogtreecommitdiffstats
path: root/tools/pci
diff options
context:
space:
mode:
authorShunyong Yang <yang.shunyong@gmail.com>2021-07-14 15:23:31 +0200
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>2021-08-05 12:01:30 +0200
commit224d8031e482bb83e2166779f46c7bb1a5f4a888 (patch)
tree58fda6139a899e06b346124c60c92c387ed96214 /tools/pci
parentLinux 5.14-rc1 (diff)
downloadlinux-224d8031e482bb83e2166779f46c7bb1a5f4a888.tar.xz
linux-224d8031e482bb83e2166779f46c7bb1a5f4a888.zip
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. Link: https://lore.kernel.org/r/20210714132331.5200-1-yang.shunyong@gmail.com Signed-off-by: Shunyong Yang <yang.shunyong@gmail.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'tools/pci')
-rw-r--r--tools/pci/pcitest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/pci/pcitest.c b/tools/pci/pcitest.c
index 0a1344c45213..441b54234635 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 = {};
int ret = -EINVAL;
int fd;