pwm: atmel-tcb: Harmonize resource allocation order
[ Upstream commit 0323e8fe ] 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: c1162232 ("pwm: atmel-tcb: Fix resource freeing in error path and remove") Signed-off-by:
Sasha Levin <sashal@kernel.org>
Loading