Commit a07a296b authored by Jean Sacren's avatar Jean Sacren Committed by David S. Miller

net: ipvtap: 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: default avatarJean Sacren <sakiwit@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1c5b5b3f
...@@ -162,7 +162,7 @@ static int ipvtap_device_event(struct notifier_block *unused, ...@@ -162,7 +162,7 @@ static int ipvtap_device_event(struct notifier_block *unused,
devt = MKDEV(MAJOR(ipvtap_major), vlantap->tap.minor); devt = MKDEV(MAJOR(ipvtap_major), vlantap->tap.minor);
classdev = device_create(&ipvtap_class, &dev->dev, devt, classdev = device_create(&ipvtap_class, &dev->dev, devt,
dev, tap_name); dev, "%s", tap_name);
if (IS_ERR(classdev)) { if (IS_ERR(classdev)) {
tap_free_minor(ipvtap_major, &vlantap->tap); tap_free_minor(ipvtap_major, &vlantap->tap);
return notifier_from_errno(PTR_ERR(classdev)); return notifier_from_errno(PTR_ERR(classdev));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment