diff mbox series

[next] agp/amd64: remove redundant assignment to variable i

Message ID 20231023132759.666224-1-colin.i.king@gmail.com (mailing list archive)
State New, archived
Headers show
Series [next] agp/amd64: remove redundant assignment to variable i | expand

Commit Message

Colin Ian King Oct. 23, 2023, 1:27 p.m. UTC
The variable i is being initialized to 0 and then again in the
following for-loop. The initialization outside the for-loop is
redundant and can be removed.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/char/agp/amd64-agp.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
index ce8651436609..47bd3b8a54b4 100644
--- a/drivers/char/agp/amd64-agp.c
+++ b/drivers/char/agp/amd64-agp.c
@@ -333,7 +333,6 @@  static int cache_nbs(struct pci_dev *pdev, u32 cap_ptr)
 	if (!amd_nb_has_feature(AMD_NB_GART))
 		return -ENODEV;
 
-	i = 0;
 	for (i = 0; i < amd_nb_num(); i++) {
 		struct pci_dev *dev = node_to_amd_nb(i)->misc;
 		if (fix_northbridge(dev, pdev, cap_ptr) < 0) {