[PATCH 4.4 49/53] ASoC: rsnd: dont call update callback if it was NULL

From: Greg Kroah-Hartman
Date: Mon Aug 28 2017 - 04:28:46 EST


4.4-stable review patch. If anyone has any objections, please let me know.

------------------

From: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>

commit d7289565483c65094d0473555625a4acd89567d3 upstream.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
Signed-off-by: Thong Ho <thong.ho.px@xxxxxxxxxxxxxxx>
Signed-off-by: Nhan Nguyen <nhan.nguyen.yb@xxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
sound/soc/sh/rcar/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -1016,7 +1016,7 @@ static int rsnd_kctrl_put(struct snd_kco
}
}

- if (change)
+ if (change && cfg->update)
cfg->update(cfg->io, mod);

return change;