summaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <kishon@ti.com>2020-03-17 15:31:57 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-13 10:34:24 +0200
commitcbd8aa4c013c0352c363cc612c81c5bd628cdf68 (patch)
treec1be430c316a4a40b96910cc368c29a22b67fcf1 /drivers/misc
parentf46117cb82fd863d900a9d6be8b00ef71f862f04 (diff)
downloadlinux-stable-cbd8aa4c013c0352c363cc612c81c5bd628cdf68.tar.gz
linux-stable-cbd8aa4c013c0352c363cc612c81c5bd628cdf68.tar.bz2
linux-stable-cbd8aa4c013c0352c363cc612c81c5bd628cdf68.zip
misc: pci_endpoint_test: Fix to support > 10 pci-endpoint-test devices
commit 6b443e5c80b67a7b8a85b33d052d655ef9064e90 upstream. 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 commit 2c156ac71c6b ("misc: Add host side PCI driver for PCI test function device") limited the length of the "name" to 20 characters. Change the length of the name to 24 in order to support upto 10000 pci-endpoint-test devices. Fixes: 2c156ac71c6b ("misc: Add host side PCI driver for PCI test function device") Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Cc: stable@vger.kernel.org # v4.14+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/pci_endpoint_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c
index 230f1e8538dc..953af49dd38a 100644
--- a/drivers/misc/pci_endpoint_test.c
+++ b/drivers/misc/pci_endpoint_test.c
@@ -466,7 +466,7 @@ static int pci_endpoint_test_probe(struct pci_dev *pdev,
int err;
int irq = 0;
int id;
- char name[20];
+ char name[24];
enum pci_barno bar;
void __iomem *base;
struct device *dev = &pdev->dev;