On Wed, Jul 29, 2015 at 08:57:36AM +0200, Markus Pargmann wrote: > On Tue, Jul 28, 2015 at 11:50:04AM +0200, Johan Hovold wrote: > > On Fri, Jul 17, 2015 at 11:32:48AM +0200, Markus Pargmann wrote: > > > + char *gpio_name = kstrdup(buf, GFP_KERNEL); > > > > Must check for allocation failures, but why use kstrdup at all? > > Yes have to check that. > strim() may modify the buf variable which is constant. > > > > + > > > + desc = gpio_name_to_desc(strim(gpio_name)); Ah, I missed that strim. Johan -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html