[PATCH 7/9] gpiolib-sysfs: Add gpio name parsing for sysfs export
From: johan@kernel.org (Johan Hovold)
Date: 2015-07-31 08:44:58
Also in:
linux-gpio
From: johan@kernel.org (Johan Hovold)
Date: 2015-07-31 08:44:58
Also in:
linux-gpio
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:quoted
On Fri, Jul 17, 2015 at 11:32:48AM +0200, Markus Pargmann wrote:
quoted
quoted
+ 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.quoted
quoted
+ + desc = gpio_name_to_desc(strim(gpio_name));
Ah, I missed that strim. Johan