Commit 649496b6 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

staging: bcm2835-audio: double free in init error path

We free instance here and in the caller.  It should be only the caller
which handles it.

Fixes: d7ca3a71 ("staging: bcm2835-audio: Operate non-atomic PCM ops")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarTakashi Iwai <tiwai@suse.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4765f683
...@@ -138,7 +138,6 @@ vc_vchi_audio_init(VCHI_INSTANCE_T vchi_instance, ...@@ -138,7 +138,6 @@ vc_vchi_audio_init(VCHI_INSTANCE_T vchi_instance,
dev_err(instance->dev, dev_err(instance->dev,
"failed to open VCHI service connection (status=%d)\n", "failed to open VCHI service connection (status=%d)\n",
status); status);
kfree(instance);
return -EPERM; return -EPERM;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment