Thread (1 message) 1 message, 1 author, 2012-04-17

[PATCH V4 3/5] pinctrl: Add SPEAr pinctrl drivers

From: Viresh Kumar <hidden>
Date: 2012-04-17 08:32:08
Also in: linux-devicetree

On 4/16/2012 9:43 AM, Viresh KUMAR wrote:
quoted hunk
diff --git a/drivers/pinctrl/spear/pinctrl-spear.c b/drivers/pinctrl/spear/pinctrl-spear.c

+int spear_pinctrl_dt_node_to_map(struct pinctrl_dev *pctldev,
+				 struct device_node *np_config,
+				 struct pinctrl_map **map, unsigned *num_maps)
+{
+
+	*map = kzalloc(sizeof(*map) * count, GFP_KERNEL);
+	if (!*map)
+		return -ENOMEM;
+
Linus,

This was the place that caused crash for me.

I would apply following change in my patch before sending pull request
to Arnd.

-       *map = kzalloc(sizeof(*map) * count, GFP_KERNEL);
+       *map = kzalloc(sizeof(**map) * count, GFP_KERNEL);

--
viresh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help