Browse Source

misc: pci_endpoint_test: Fix to support > 10 pci-endpoint-test devices

Adding more than 10 pci-endpoint-test devices results in
"kobject_add_internal failed for pci-endpoint-test.1 with -EEXIST, don't
try to register things with the same name in the same directory". This
is because the length of the "name" is limited to 20 characters. Change
the length of the name to 24 in order to support upto 10000
pci-endpoint-test devices.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Kishon Vijay Abraham I 6 years ago
parent
commit
eb81fe449a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/misc/pci_endpoint_test.c

+ 1 - 1
drivers/misc/pci_endpoint_test.c

@@ -734,7 +734,7 @@ static int pci_endpoint_test_probe(struct pci_dev *pdev,
 {
 	int err;
 	int id;
-	char name[20];
+	char name[24];
 	enum pci_barno bar;
 	void __iomem *base;
 	struct device *dev = &pdev->dev;