[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181016150228.16994-3-nsaenzjulienne@suse.de>
Date: Tue, 16 Oct 2018 17:02:21 +0200
From: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
To: gregkh@...uxfoundation.org
Cc: eric@...olt.net, stefan.wahren@...e.com,
linux-rpi-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, robh+dt@...nel.org, tiwai@...e.de,
nsaenzjulienne@...e.de
Subject: [PATCH 2/9] staging: bcm2835-audio: don't initialize memory twice
The memory is being allocated with devres_alloc(), wich ultimately uses
__GFP_ZERO to call kmalloc. We don't need to zero the memory area again
in bcm2835-audio.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
---
drivers/staging/vc04_services/bcm2835-audio/bcm2835.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
index 87d56ab1ffa0..0efae7068fef 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
@@ -39,8 +39,6 @@ static int bcm2835_devm_add_vchi_ctx(struct device *dev)
if (!vchi_ctx)
return -ENOMEM;
- memset(vchi_ctx, 0, sizeof(*vchi_ctx));
-
ret = bcm2835_new_vchi_ctx(dev, vchi_ctx);
if (ret) {
devres_free(vchi_ctx);
--
2.19.1
Powered by blists - more mailing lists