mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-25 02:32:08 +03:00
The error path of the Tegra210 rt565x machine driver does not unregister the headset switch on failure. Failure to unregister the headset switch on failure prevents causes subsequent calls to register a switch to fail because one is already registered. Hence, if the probe of the rt565x machine driver is deferred, for example because the codec is not register yet, this will cause subsequent probe attempts to fail because a switch is already registered. Fix the above issues by unregistering the switch in the error path of the Tegra210 rt565x machine driver probe. Finally ensure the switch is unregistered in the removal of the rt565x machine driver. Bug 2044665 Change-Id: Iaeb6f7ae30b6fdff46b0a8679003674804399a99 Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1634166 (cherry picked from commit 1a9cea0e8e97c5b042088d5988184c81db85ea6a) Reviewed-on: https://git-master.nvidia.com/r/1642330 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>