ASoC: qcom: apq8096: set card as device drvdata
snd_soc_card is retrieved as device drvdata during unbind(). Set it as drvdata during bind() to avoid memory corruption during unbind(). Signed-off-by: Rohit kumar <rohitkr@codeaurora.org> Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
a0d847c380
commit
d5c4e972d5
@ -140,6 +140,7 @@ static int apq8096_bind(struct device *dev)
|
|||||||
|
|
||||||
component_bind_all(dev, card);
|
component_bind_all(dev, card);
|
||||||
card->dev = dev;
|
card->dev = dev;
|
||||||
|
dev_set_drvdata(dev, card);
|
||||||
ret = apq8096_sbc_parse_of(card);
|
ret = apq8096_sbc_parse_of(card);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "Error parsing OF data\n");
|
dev_err(dev, "Error parsing OF data\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user