Re: [PATCH][bugfix] usb/gadget: f_mass_storage: use string literal as format in dev_set_name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 25 2013, Andrzej Pietrasiewicz <andrzej.p@xxxxxxxxxxx> wrote:
> Fix commit b27c08c953e994f792a03d9b7cbc5cf3f9844135 where dev_set_name()
> is used without a string literal as format.
>
> Reported-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
> Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@xxxxxxxxxxx>
> Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>

Acked-by: Michal Nazarewicz <mina86@xxxxxxxxxx>

> ---
>
>  drivers/usb/gadget/f_mass_storage.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c
> index 8fa8b1f..a03ba2c 100644
> --- a/drivers/usb/gadget/f_mass_storage.c
> +++ b/drivers/usb/gadget/f_mass_storage.c
> @@ -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);

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +--<mpn@xxxxxxxxxx>--<xmpp:mina86@xxxxxxxxxx>--ooO--(_)--Ooo--

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux