]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
MIPS: Sibyte: Use vzalloc in sbbus profiler
authorJoe Perches <joe@perches.com>
Fri, 5 Nov 2010 03:07:26 +0000 (20:07 -0700)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 18 Jan 2011 18:30:21 +0000 (19:30 +0100)
Signed-off-by: Joe Perches <joe@perches.com>
To: Jiri Kosina <trivial@kernel.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/1756/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/sibyte/common/sb_tbprof.c

index 87ccdb4b5ac911a0448293bd8ee168c521fc6848..48853ab5bcf02331919b469b8d00ced02d8f06ed 100644 (file)
@@ -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);