PCI/sysfs: Remove unnecessary zero in initializer
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 28 Oct 2024 17:40:46 +0000 (19:40 +0200)
committerKrzysztof Wilczyński <kwilczynski@kernel.org>
Wed, 15 Jan 2025 03:54:44 +0000 (03:54 +0000)
Providing empty initializer for an array is enough to set its elements
to zero. Thus, remove the redundant 0 from the initializer.

Link: https://lore.kernel.org/r/20241028174046.1736-4-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
drivers/pci/pci-sysfs.c

index 40bc59d33e6b5d2797004cd34cebc15d7ca4bfb4..a88c65441b71f3f631846b3326555d1021ee95ba 100644 (file)
@@ -1463,7 +1463,7 @@ static ssize_t reset_method_store(struct device *dev,
        struct pci_dev *pdev = to_pci_dev(dev);
        char *tmp_options, *name;
        int m, n;
-       u8 reset_methods[PCI_NUM_RESET_METHODS] = { 0 };
+       u8 reset_methods[PCI_NUM_RESET_METHODS] = {};
 
        if (sysfs_streq(buf, "")) {
                pdev->reset_methods[0] = 0;