Skip to content

Commit

Permalink
net: macvtap: fix template string argument of device_create() call
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jean Sacren authored and David S. Miller committed Oct 16, 2021
1 parent 93eb2b7 commit 1c5b5b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/macvtap.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ static int macvtap_device_event(struct notifier_block *unused,

devt = MKDEV(MAJOR(macvtap_major), vlantap->tap.minor);
classdev = device_create(&macvtap_class, &dev->dev, devt,
dev, tap_name);
dev, "%s", tap_name);
if (IS_ERR(classdev)) {
tap_free_minor(macvtap_major, &vlantap->tap);
return notifier_from_errno(PTR_ERR(classdev));
Expand Down

0 comments on commit 1c5b5b3

Please sign in to comment.