ASoC: samsung: i2s: Fix secondary platform device unregistration
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Tue, 19 Feb 2019 15:19:40 +0000 (16:19 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 19 Feb 2019 15:49:29 +0000 (15:49 +0000)
commit022c4156697b9ae30a00f5cd7cee08ed61554e86
treef519bd85ebdea449b3ba569dfc243d8daaff8e6f
parentbc3523a3acb3ba311d5d9939901ff2b7f8833e44
ASoC: samsung: i2s: Fix secondary platform device unregistration

This fixes unregistration of the secondary platform device so all
resources are properly released.  Additionally the removal sequence
is corrected so it is in reverse order comparing to probe sequence.
The test against NULL priv->pdev_sec is removed as it is not necessary.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/samsung/i2s.c