Message ID | E1eo8rG-0000Tm-PS@debutante |
---|---|
State | Accepted |
Commit | 5e558f8afaec8957932b1dbe5aeff800f9fc6957 |
Headers | show |
Series | Applied "ASoC: hdmi-codec: Fix module unloading caused kernel crash" to the asoc tree | expand |
diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c index 5672e516bec3..c1830ccd3bb8 100644 --- a/sound/soc/codecs/hdmi-codec.c +++ b/sound/soc/codecs/hdmi-codec.c @@ -798,12 +798,7 @@ static int hdmi_codec_probe(struct platform_device *pdev) static int hdmi_codec_remove(struct platform_device *pdev) { - struct device *dev = &pdev->dev; - struct hdmi_codec_priv *hcp; - - hcp = dev_get_drvdata(dev); - kfree(hcp->chmap_info); - snd_soc_unregister_codec(dev); + snd_soc_unregister_codec(&pdev->dev); return 0; }