Skip to content

Commit 1c5b5b3

Browse files
sacrendavem330
authored andcommitted
net: macvtap: fix template string argument of device_create() call
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 93eb2b7 commit 1c5b5b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/macvtap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ static int macvtap_device_event(struct notifier_block *unused,
169169

170170
devt = MKDEV(MAJOR(macvtap_major), vlantap->tap.minor);
171171
classdev = device_create(&macvtap_class, &dev->dev, devt,
172-
dev, tap_name);
172+
dev, "%s", tap_name);
173173
if (IS_ERR(classdev)) {
174174
tap_free_minor(macvtap_major, &vlantap->tap);
175175
return notifier_from_errno(PTR_ERR(classdev));

0 commit comments

Comments
 (0)