Skip to content

Commit

Permalink
MIPS: Sibyte: Use vzalloc in sbbus profiler
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joe Perches authored and Ralf Baechle committed Jan 18, 2011
1 parent 1b59be2 commit a1181ca
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/mips/sibyte/common/sb_tbprof.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a1181ca

Please sign in to comment.