mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-09 18:15:49 +00:00
pwm: atmel-tcb: Harmonize resource allocation order
[ Upstream commit0323e8fedd] Allocate driver data as first resource in the probe function. This way it can be used during allocation of the other resources (instead of assigning these to local variables first and update driver data only when it's allocated). Also as driver data is allocated using a devm function this should happen first to have the order of freeing resources in the error path and the remove function in reverse. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> Stable-dep-of:c11622324c("pwm: atmel-tcb: Fix resource freeing in error path and remove") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
b9734e8505
commit
c42256a283
1 changed files with 20 additions and 29 deletions
Loading…
Add table
Add a link
Reference in a new issue