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

From: [email-masked] (Viresh Kumar)
Date: Tue, 17 Apr 2012 14:02:08 +0530

On 4/16/2012 9:43 AM, Viresh KUMAR wrote:
> 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