ASoC: hdac_hdmi: Fix possible memory leak in hw_params
authorSubhransu S. Prusty <subhransu.s.prusty@intel.com>
Wed, 17 Feb 2016 16:03:59 +0000 (21:33 +0530)
committerMark Brown <broonie@kernel.org>
Fri, 19 Feb 2016 15:56:53 +0000 (00:56 +0900)
commit6793a3d70676c6f3d2ec0ce4e1e241617541702c
treeeb9d4feb9c90fef1cda112fe65adf8f2b7a6c4b5
parentcd890ade492784ae06dadd20e688ba1760d3c801
ASoC: hdac_hdmi: Fix possible memory leak in hw_params

It's possible for hw_params to be called two times. So add NULL
check to prevent memory leak.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/hdac_hdmi.c