linux-mips
[Top] [All Lists]

[PATCH 02/49] arch/mips: Use vzalloc

To: Jiri Kosina <trivial@kernel.org>
Subject: [PATCH 02/49] arch/mips: Use vzalloc
From: Joe Perches <joe@perches.com>
Date: Thu, 4 Nov 2010 20:07:26 -0700
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
In-reply-to: <alpine.DEB.2.00.1011031108260.11625@router.home>
In-reply-to: <cover.1288925424.git.joe@perches.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <alpine.DEB.2.00.1011031108260.11625@router.home>
References: <cover.1288925424.git.joe@perches.com>
Sender: linux-mips-bounce@linux-mips.org
Signed-off-by: Joe Perches <joe@perches.com>
---
 arch/mips/sibyte/common/sb_tbprof.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/arch/mips/sibyte/common/sb_tbprof.c 
b/arch/mips/sibyte/common/sb_tbprof.c
index 87ccdb4..48853ab 100644
--- a/arch/mips/sibyte/common/sb_tbprof.c
+++ b/arch/mips/sibyte/common/sb_tbprof.c
@@ -410,14 +410,13 @@ static int sbprof_tb_open(struct inode *inode, struct 
file *filp)
                return -EBUSY;
 
        memset(&sbp, 0, sizeof(struct sbprof_tb));
-       sbp.sbprof_tbbuf = vmalloc(MAX_TBSAMPLE_BYTES);
+       sbp.sbprof_tbbuf = vzalloc(MAX_TBSAMPLE_BYTES);
        if (!sbp.sbprof_tbbuf) {
                sbp.open = SB_CLOSED;
                wmb();
                return -ENOMEM;
        }
 
-       memset(sbp.sbprof_tbbuf, 0, MAX_TBSAMPLE_BYTES);
        init_waitqueue_head(&sbp.tb_sync);
        init_waitqueue_head(&sbp.tb_read);
        mutex_init(&sbp.lock);
-- 
1.7.3.1.g432b3.dirty


<Prev in Thread] Current Thread [Next in Thread>