Skip to content

Commit 156e3c2

Browse files
Karicheri, Muralidharandavem330
authored andcommitted
net: netcp: remove dead code from the driver
netcp_core is the first driver that will get initialized and the modules (ethss, pa etc) will then get initialized. So the code at the end of netcp_probe() that iterate over the modules is a dead code as the module list will be always be empty. So remove this code. Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 8c85151 commit 156e3c2

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

drivers/net/ethernet/ti/netcp_core.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2040,7 +2040,6 @@ static int netcp_probe(struct platform_device *pdev)
20402040
struct device_node *child, *interfaces;
20412041
struct netcp_device *netcp_device;
20422042
struct device *dev = &pdev->dev;
2043-
struct netcp_module *module;
20442043
int ret;
20452044

20462045
if (!node) {
@@ -2087,14 +2086,6 @@ static int netcp_probe(struct platform_device *pdev)
20872086
/* Add the device instance to the list */
20882087
list_add_tail(&netcp_device->device_list, &netcp_devices);
20892088

2090-
/* Probe & attach any modules already registered */
2091-
mutex_lock(&netcp_modules_lock);
2092-
for_each_netcp_module(module) {
2093-
ret = netcp_module_probe(netcp_device, module);
2094-
if (ret < 0)
2095-
dev_err(dev, "module(%s) probe failed\n", module->name);
2096-
}
2097-
mutex_unlock(&netcp_modules_lock);
20982089
return 0;
20992090

21002091
probe_quit_interface:

0 commit comments

Comments
 (0)