Skip to content

Commit a49287d

Browse files
committed
PCI: Remove unnecessary initializations
We always assign "fields" immediately, so remove the unnecessary initializations. No functional change intended. Link: https://lore.kernel.org/r/20230824193712.542167-4-helgaas@kernel.org Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
1 parent ecfea5d commit a49287d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/pci/pci-driver.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ static ssize_t new_id_store(struct device_driver *driver, const char *buf,
193193
u32 vendor, device, subvendor = PCI_ANY_ID,
194194
subdevice = PCI_ANY_ID, class = 0, class_mask = 0;
195195
unsigned long driver_data = 0;
196-
int fields = 0;
196+
int fields;
197197
int retval = 0;
198198

199199
fields = sscanf(buf, "%x %x %x %x %x %x %lx",
@@ -260,7 +260,7 @@ static ssize_t remove_id_store(struct device_driver *driver, const char *buf,
260260
struct pci_driver *pdrv = to_pci_driver(driver);
261261
u32 vendor, device, subvendor = PCI_ANY_ID,
262262
subdevice = PCI_ANY_ID, class = 0, class_mask = 0;
263-
int fields = 0;
263+
int fields;
264264
size_t retval = -ENODEV;
265265

266266
fields = sscanf(buf, "%x %x %x %x %x %x",

0 commit comments

Comments
 (0)