All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 2/2] net: ipvtap: fix template string argument of device_create() call
@ 2021-10-16  5:41 Jεan Sacren
  0 siblings, 0 replies; only message in thread
From: Jεan Sacren @ 2021-10-16  5:41 UTC (permalink / raw)
  To: David S . Miller; +Cc: kuba, netdev

From: Jean Sacren <sakiwit@gmail.com>

The last argument of device_create() call should be a template string.
The tap_name variable should be the argument to the string, but not the
argument of the call itself.  We should add the template string and turn
tap_name into its argument.

Signed-off-by: Jean Sacren <sakiwit@gmail.com>
---
 drivers/net/ipvlan/ipvtap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ipvlan/ipvtap.c b/drivers/net/ipvlan/ipvtap.c
index 1cedb634f4f7..ef02f2cf5ce1 100644
--- a/drivers/net/ipvlan/ipvtap.c
+++ b/drivers/net/ipvlan/ipvtap.c
@@ -162,7 +162,7 @@ static int ipvtap_device_event(struct notifier_block *unused,
 
 		devt = MKDEV(MAJOR(ipvtap_major), vlantap->tap.minor);
 		classdev = device_create(&ipvtap_class, &dev->dev, devt,
-					 dev, tap_name);
+					 dev, "%s", tap_name);
 		if (IS_ERR(classdev)) {
 			tap_free_minor(ipvtap_major, &vlantap->tap);
 			return notifier_from_errno(PTR_ERR(classdev));

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-16  5:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-16  5:41 [PATCH net-next 2/2] net: ipvtap: fix template string argument of device_create() call Jεan Sacren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.