mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
ASoC: rk3308_codec: fix the missing device_unregister
We need unreigster device when we remove platform or probe failed. Change-Id: Ic43a9fcc540b404cee119c17c543d509b121e126 Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
This commit is contained in:
@@ -2528,6 +2528,7 @@ failed:
|
||||
clk_disable_unprepare(rk3308->mclk_rx);
|
||||
clk_disable_unprepare(rk3308->mclk_tx);
|
||||
clk_disable_unprepare(rk3308->pclk);
|
||||
device_unregister(&rk3308->dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -2541,6 +2542,7 @@ static int rk3308_platform_remove(struct platform_device *pdev)
|
||||
clk_disable_unprepare(rk3308->mclk_tx);
|
||||
clk_disable_unprepare(rk3308->pclk);
|
||||
snd_soc_unregister_codec(&pdev->dev);
|
||||
device_unregister(&rk3308->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user