common/mlx5: remove useless assignment
authorMichael Baum <michaelba@mellanox.com>
Wed, 24 Jun 2020 13:33:50 +0000 (13:33 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 30 Jun 2020 12:52:30 +0000 (14:52 +0200)
The mlx5_dev_to_pci_addr function defines a variable called ret inside a
loop and uses it.

During the loop, the function assigns a value within the variable and
breaks from the loop, so that this assigning has done nothing and is
actually unnecessary.

Remove the unnecessary assigning.

Signed-off-by: Michael Baum <michaelba@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
drivers/common/mlx5/linux/mlx5_common_os.c

index e422e95..e74aa89 100644 (file)
@@ -66,7 +66,6 @@ mlx5_dev_to_pci_addr(const char *dev_path,
                           &pci_addr->bus,
                           &pci_addr->devid,
                           &pci_addr->function) == 4) {
-                       ret = 0;
                        break;
                }
        }