Skip to content

Commit 2d8e276

Browse files
Karicheri, Muralidharannsekhar
authored andcommitted
net: netcp: remove dead code from the driver
commit 156e3c2 upstream. 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> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
1 parent 370edb9 commit 2d8e276

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
@@ -2050,7 +2050,6 @@ static int netcp_probe(struct platform_device *pdev)
20502050
struct device_node *child, *interfaces;
20512051
struct netcp_device *netcp_device;
20522052
struct device *dev = &pdev->dev;
2053-
struct netcp_module *module;
20542053
int ret;
20552054

20562055
if (!node) {
@@ -2097,14 +2096,6 @@ static int netcp_probe(struct platform_device *pdev)
20972096
/* Add the device instance to the list */
20982097
list_add_tail(&netcp_device->device_list, &netcp_devices);
20992098

2100-
/* Probe & attach any modules already registered */
2101-
mutex_lock(&netcp_modules_lock);
2102-
for_each_netcp_module(module) {
2103-
ret = netcp_module_probe(netcp_device, module);
2104-
if (ret < 0)
2105-
dev_err(dev, "module(%s) probe failed\n", module->name);
2106-
}
2107-
mutex_unlock(&netcp_modules_lock);
21082099
return 0;
21092100

21102101
probe_quit_interface:

0 commit comments

Comments
 (0)