diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ti/davinci_emac.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ti/davinci_emac.c b/drivers/net/ti/davinci_emac.c index bfe1b84cd5..2dfadbd82d 100644 --- a/drivers/net/ti/davinci_emac.c +++ b/drivers/net/ti/davinci_emac.c @@ -816,7 +816,7 @@ static int davinci_emac_probe(struct udevice *dev) struct mii_dev *mdiodev = mdio_alloc(); if (!mdiodev) return -ENOMEM; - strncpy(mdiodev->name, phy[i].name, MDIO_NAME_LEN); + strlcpy(mdiodev->name, phy[i].name, MDIO_NAME_LEN); mdiodev->read = davinci_mii_phy_read; mdiodev->write = davinci_mii_phy_write; |