Re: [PATCH v2] HID: Add driver Retrode2 joypad and adapter

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

 



On Wed, 2017-06-07 at 10:45 -0700, Dmitry Torokhov wrote:
> > +     len = strlen(CONTROLLER_NAME_BASE) + strlen(suffix) +
> > +                     number ? 5 : 2;
> > +     name = devm_kzalloc(&hi->input->dev, len, GFP_KERNEL);
> 
> Please use dev_kasprintf() here.

Took me a while to find it was dev*m*_... :)

> > +     if (name) {
> > +             if (number)
> > +                     sprintf(name, "%s %s #%d",
> > CONTROLLER_NAME_BASE,
> > +                             suffix, number);
> > +             else
> > +                     sprintf(name, "%s %s", CONTROLLER_NAME_BASE,
> > +                             suffix);
> > +             hi->input->name = name;
> > +     }
> 
> else return -ENOMEM ?

Done.
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux