airoha: fix kernel panic from I2S driver
authorChristian Marangi <[email protected]>
Thu, 4 Dec 2025 23:54:38 +0000 (00:54 +0100)
committerChristian Marangi <[email protected]>
Thu, 4 Dec 2025 23:54:38 +0000 (00:54 +0100)
Commit 8f1914053b24 ("airoha: replace I2S patch with upstream pending
version") introduced a kernel panic with I2S driver.

Add the fixed patch to fix the kernel panic.

Fixes: 8f1914053b24 ("airoha: replace I2S patch with upstream pending version")
Signed-off-by: Christian Marangi <[email protected]>
target/linux/airoha/patches-6.12/123-02-ASoC-airoha-Add-AFE-and-I2S-driver-for-Airoha-AN7581.patch

index 123d7181cd052a8f33f2adcae322fec596201772..b5cd4982f1bc496aafcb269db24da58dba2fa592 100644 (file)
@@ -499,6 +499,10 @@ Signed-off-by: Christian Marangi <[email protected]>
 +      if (!afe->platform_priv)
 +              return -ENOMEM;
 +
++      afe_priv = afe->platform_priv;
++      afe->dev = &pdev->dev;
++      dev = afe->dev;
++
 +      reset = devm_reset_control_get_exclusive(dev, NULL);
 +      if (IS_ERR(reset))
 +              return PTR_ERR(reset);
@@ -508,10 +512,6 @@ Signed-off-by: Christian Marangi <[email protected]>
 +      usleep_range(10, 20);
 +      reset_control_deassert(reset);
 +
-+      afe_priv = afe->platform_priv;
-+      afe->dev = &pdev->dev;
-+      dev = afe->dev;
-+
 +      afe->base_addr = devm_platform_ioremap_resource(pdev, 0);
 +      if (IS_ERR(afe->base_addr))
 +              return PTR_ERR(afe->base_addr);