OSDN Git Service

net: ethernet: sun4i-emac: Fix misuse of strlcpy
authorJoe Perches <joe@perches.com>
Thu, 4 Jul 2019 23:57:45 +0000 (16:57 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Jul 2019 02:22:03 +0000 (19:22 -0700)
Probable cut&paste typo - use the correct field size.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/allwinner/sun4i-emac.c

index 9e06dff..40a359d 100644 (file)
@@ -224,8 +224,8 @@ static int emac_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 static void emac_get_drvinfo(struct net_device *dev,
                              struct ethtool_drvinfo *info)
 {
-       strlcpy(info->driver, DRV_NAME, sizeof(DRV_NAME));
-       strlcpy(info->version, DRV_VERSION, sizeof(DRV_VERSION));
+       strlcpy(info->driver, DRV_NAME, sizeof(info->driver));
+       strlcpy(info->version, DRV_VERSION, sizeof(info->version));
        strlcpy(info->bus_info, dev_name(&dev->dev), sizeof(info->bus_info));
 }