Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e670b298 authored by Robert Jarzmik's avatar Robert Jarzmik Committed by Linus Walleij
Browse files

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: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent fea0fe60
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -292,7 +292,7 @@ static int pxa2xx_build_functions(struct pxa_pinctrl *pctl)
	if (!pctl->functions)
	if (!pctl->functions)
		return -ENOMEM;
		return -ENOMEM;


	kfree(functions);
	devm_kfree(pctl->dev, functions);
	return 0;
	return 0;
}
}


@@ -328,7 +328,7 @@ static int pxa2xx_build_groups(struct pxa_pinctrl *pctl)
		memcpy(func->groups, gtmp, ngroups * sizeof(*gtmp));
		memcpy(func->groups, gtmp, ngroups * sizeof(*gtmp));
	}
	}


	kfree(gtmp);
	devm_kfree(pctl->dev, gtmp);
	return 0;
	return 0;
}
}