usb/gadget: f_mass_storage: use string literal as format in dev_set_name
authorAndrzej Pietrasiewicz <[email protected]>
Fri, 25 Oct 2013 07:09:27 +0000 (09:09 +0200)
committerGreg Kroah-Hartman <[email protected]>
Fri, 25 Oct 2013 08:12:14 +0000 (09:12 +0100)
Fix commit b27c08c953e994f792a03d9b7cbc5cf3f9844135 where dev_set_name()
is used without a string literal as format.

Reported-by: Fengguang Wu <[email protected]>
Signed-off-by: Andrzej Pietrasiewicz <[email protected]>
Signed-off-by: Kyungmin Park <[email protected]>
Acked-by: Michal Nazarewicz <[email protected]>
Cc: Kees Cook <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/usb/gadget/f_mass_storage.c

index 8fa8b1f771fb9937a6556bd9375b913d7e024da0..a03ba2c83589ee15f9c1880d17f1aa133eb47f29 100644 (file)
@@ -2949,7 +2949,7 @@ int fsg_common_create_lun(struct fsg_common *common, struct fsg_lun_config *cfg,
                lun->dev.release = fsg_lun_release;
                lun->dev.parent = &common->gadget->dev;
                dev_set_drvdata(&lun->dev, &common->filesem);
-               dev_set_name(&lun->dev, name);
+               dev_set_name(&lun->dev, "%s", name);
                lun->name = dev_name(&lun->dev);
 
                rc = fsg_common_add_sysfs(common, lun);