From: Viresh Kumar Date: Wed, 27 Jan 2016 05:46:57 +0000 (+0530) Subject: greybus: audio_codec: Free gccodec on codec probe failure X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2df6396160b019d992241e2db8a6d5a15f654e69;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c index 1f39c9cd1aee..a7ccaaad5281 100644 --- a/drivers/staging/greybus/audio_codec.c +++ b/drivers/staging/greybus/audio_codec.c @@ -713,6 +713,7 @@ topology_error: kfree(topology); base_error: gbcodec->mgmt_connection = NULL; + gbaudio_free_codec(dev, gbcodec); return ret; }