diff options
Diffstat (limited to 'drivers/pinctrl/sunxi/pinctrl-sunxi.c')
-rw-r--r-- | drivers/pinctrl/sunxi/pinctrl-sunxi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c index f1ca75e6d7b1..5f38c7f67834 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c +++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c | |||
@@ -211,6 +211,10 @@ static int sunxi_pctrl_dt_node_to_map(struct pinctrl_dev *pctldev, | |||
211 | configlen++; | 211 | configlen++; |
212 | 212 | ||
213 | pinconfig = kzalloc(configlen * sizeof(*pinconfig), GFP_KERNEL); | 213 | pinconfig = kzalloc(configlen * sizeof(*pinconfig), GFP_KERNEL); |
214 | if (!pinconfig) { | ||
215 | kfree(*map); | ||
216 | return -ENOMEM; | ||
217 | } | ||
214 | 218 | ||
215 | if (!of_property_read_u32(node, "allwinner,drive", &val)) { | 219 | if (!of_property_read_u32(node, "allwinner,drive", &val)) { |
216 | u16 strength = (val + 1) * 10; | 220 | u16 strength = (val + 1) * 10; |