greybus: audio_codec: Free gccodec on codec probe failure

We aren't freeing the codec, that we allocated before failing to probe
the connection. Free it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Viresh Kumar
2016-01-27 11:16:57 +05:30
committed by Greg Kroah-Hartman
parent 6e304f5963
commit 2df6396160

View File

@@ -713,6 +713,7 @@ topology_error:
kfree(topology);
base_error:
gbcodec->mgmt_connection = NULL;
gbaudio_free_codec(dev, gbcodec);
return ret;
}