X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=net%2Fdsa%2Fdsa.c;h=5db37cef50a9ccd80c642118f54dd4ecf04219b8;hb=825f4e0271b0de3f7f31d963dcdaa0056fe9b73a;hp=0eb5d5e76dfbe1f99537e8a561f1671389c09e16;hpb=80ce5f6f25bea86f4fbfb9c19c09e43ccac90bfd;p=karo-tx-linux.git diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index 0eb5d5e76dfb..5db37cef50a9 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c @@ -406,8 +406,9 @@ static int dsa_of_probe(struct platform_device *pdev) goto out_free; } - chip_index = 0; + chip_index = -1; for_each_available_child_of_node(np, child) { + chip_index++; cd = &pd->chip[chip_index]; cd->mii_bus = &mdio_bus->dev;