95b9d7a1d139aab7449e29fd5a220b74a5e3c4c6
[openwrt/staging/dangole.git] /
1 From 360a1982333c8e8f583663155479115d6eb7cd14 Mon Sep 17 00:00:00 2001
2 From: Dan Carpenter <dan.carpenter@oracle.com>
3 Date: Mon, 17 Dec 2018 10:08:54 +0300
4 Subject: [PATCH] staging: bcm2835-audio: double free in init error
5 path
6
7 commit 136ff5e49271c4c8fceeca5491c48e66b961564b upstream.
8
9 We free instance here and in the caller. It should be only the caller
10 which handles it.
11
12 Fixes: d7ca3a71545b ("staging: bcm2835-audio: Operate non-atomic PCM ops")
13 Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
14 Reviewed-by: Takashi Iwai <tiwai@suse.de>
15 Cc: stable <stable@vger.kernel.org>
16 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17 ---
18 drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 1 -
19 1 file changed, 1 deletion(-)
20
21 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
22 +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
23 @@ -145,7 +145,6 @@ vc_vchi_audio_init(VCHI_INSTANCE_T vchi_
24 dev_err(instance->dev,
25 "failed to open VCHI service connection (status=%d)\n",
26 status);
27 - kfree(instance);
28 return -EPERM;
29 }
30