net: Fix Covarity Defect 244093

Don't allow unterminated strings

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
diff --git a/net/mdio-uclass.c b/net/mdio-uclass.c
index 36a404f..1c0d252 100644
--- a/net/mdio-uclass.c
+++ b/net/mdio-uclass.c
@@ -75,7 +75,7 @@
 	pdata->mii_bus->write = mdio_write;
 	pdata->mii_bus->reset = mdio_reset;
 	pdata->mii_bus->priv = dev;
-	strncpy(pdata->mii_bus->name, dev->name, MDIO_NAME_LEN);
+	strncpy(pdata->mii_bus->name, dev->name, MDIO_NAME_LEN - 1);
 
 	return mdio_register(pdata->mii_bus);
 }