9845a03f08e55027518c0ae48177ba53a61cc2f2
[openwrt/staging/jow.git] /
1 From 2477bc42397c7be4c74429b6fb8c1325765b9a46 Mon Sep 17 00:00:00 2001
2 From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
3 Date: Wed, 17 Oct 2018 21:01:51 +0200
4 Subject: [PATCH 470/703] staging: bcm2835-audio: don't initialize memory twice
5
6 commit 2e5f59fb77397cab3bc3d156e8be4164a67d32ef upstream.
7
8 The memory is being allocated with devres_alloc(), wich ultimately uses
9 __GFP_ZERO to call kmalloc. We don't need to zero the memory area again
10 in bcm2835-audio.
11
12 Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
13 Reviewed-by: Takashi Iwai <tiwai@suse.de>
14 Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
15 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16 ---
17 drivers/staging/vc04_services/bcm2835-audio/bcm2835.c | 2 --
18 1 file changed, 2 deletions(-)
19
20 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
21 +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
22 @@ -39,8 +39,6 @@ static int bcm2835_devm_add_vchi_ctx(str
23 if (!vchi_ctx)
24 return -ENOMEM;
25
26 - memset(vchi_ctx, 0, sizeof(*vchi_ctx));
27 -
28 ret = bcm2835_new_vchi_ctx(dev, vchi_ctx);
29 if (ret) {
30 devres_free(vchi_ctx);