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

Viresh Kumar viresh.kumar at st.com
Tue Apr 17 04:32:08 EDT 2012


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



More information about the linux-arm-kernel mailing list