diff mbox series

[6/8] net: nixge: Fix misuse of strlcpy

Message ID ab064ed18bee3e59431afb742dfe7a570d7d0b58.1562283944.git.joe@perches.com
State Accepted
Delegated to: David Miller
Headers show
Series treewide: correct misuses of strscpy/strlcpy | expand

Commit Message

Joe Perches July 4, 2019, 11:57 p.m. UTC
Probable cut&paste typo - use the correct field size.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/ethernet/ni/nixge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Miller July 8, 2019, 2:23 a.m. UTC | #1
From: Joe Perches <joe@perches.com>
Date: Thu,  4 Jul 2019 16:57:46 -0700

> Probable cut&paste typo - use the correct field size.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Applied.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/ni/nixge.c b/drivers/net/ethernet/ni/nixge.c
index 96f7a9818294..0b384f97d2fd 100644
--- a/drivers/net/ethernet/ni/nixge.c
+++ b/drivers/net/ethernet/ni/nixge.c
@@ -990,7 +990,7 @@  static void nixge_ethtools_get_drvinfo(struct net_device *ndev,
 				       struct ethtool_drvinfo *ed)
 {
 	strlcpy(ed->driver, "nixge", sizeof(ed->driver));
-	strlcpy(ed->bus_info, "platform", sizeof(ed->driver));
+	strlcpy(ed->bus_info, "platform", sizeof(ed->bus_info));
 }
 
 static int nixge_ethtools_get_coalesce(struct net_device *ndev,