aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Jarzmik <robert.jarzmik@free.fr>2015-12-12 16:43:05 -0500
committerLinus Walleij <linus.walleij@linaro.org>2015-12-15 08:07:06 -0500
commite670b29815f301e47e81d42006c80be6b7aff01d (patch)
tree49da3135a383858cd55c8fc04b6f4d951f76af92
parentfea0fe60527667282913cf9f2becb5f7c67d6185 (diff)
pinctrl: pxa: pxa2xx: add pin control skeleton
The wrong free functions were used to release temporary buffers. This didn't show up in the normal driver's life. Yet in suspend to RAM, the managed resource list is walked, and as memory was released, the list is corrupted and make the kernel Oops. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/pinctrl/pxa/pinctrl-pxa2xx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pinctrl/pxa/pinctrl-pxa2xx.c b/drivers/pinctrl/pxa/pinctrl-pxa2xx.c
index e01914460219..d90e205cf809 100644
--- a/drivers/pinctrl/pxa/pinctrl-pxa2xx.c
+++ b/drivers/pinctrl/pxa/pinctrl-pxa2xx.c
@@ -292,7 +292,7 @@ static int pxa2xx_build_functions(struct pxa_pinctrl *pctl)
292 if (!pctl->functions) 292 if (!pctl->functions)
293 return -ENOMEM; 293 return -ENOMEM;
294 294
295 kfree(functions); 295 devm_kfree(pctl->dev, functions);
296 return 0; 296 return 0;
297} 297}
298 298
@@ -328,7 +328,7 @@ static int pxa2xx_build_groups(struct pxa_pinctrl *pctl)
328 memcpy(func->groups, gtmp, ngroups * sizeof(*gtmp)); 328 memcpy(func->groups, gtmp, ngroups * sizeof(*gtmp));
329 } 329 }
330 330
331 kfree(gtmp); 331 devm_kfree(pctl->dev, gtmp);
332 return 0; 332 return 0;
333} 333}
334 334