mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
If the pinctrl node is not present in device-tree for the DMIC, DSPK or I2S, then the pinctrl states will not be initialised during device probe. This can cause the kernel to crash by attempting to dereference a NULL pointer when setting the pinctrl state. Fix this by verifying that the pinctrl state is not an error pointer or NULL before attempting to use it. Bug 1665446 Change-Id: I917141325f12bbf87371eb59a320fe08e65f0934 Signed-off-by: Jonathan Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2120320 (cherry picked from commit f3aa620e26af45a6bafe5acb65f2b06df0b877e8) Reviewed-on: https://git-master.nvidia.com/r/2122730 Reviewed-by: Automatic_Commit_Validation_User 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>