diff options
| -rw-r--r-- | arch/powerpc/platforms/cell/spufs/file.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c index b6f7b917b56c..b73c369cc6f1 100644 --- a/arch/powerpc/platforms/cell/spufs/file.c +++ b/arch/powerpc/platforms/cell/spufs/file.c | |||
| @@ -2442,7 +2442,7 @@ static int spufs_switch_log_open(struct inode *inode, struct file *file) | |||
| 2442 | goto out; | 2442 | goto out; |
| 2443 | } | 2443 | } |
| 2444 | 2444 | ||
| 2445 | ctx->switch_log = kzalloc(sizeof(struct switch_log) + | 2445 | ctx->switch_log = kmalloc(sizeof(struct switch_log) + |
| 2446 | SWITCH_LOG_BUFSIZE * sizeof(struct switch_log_entry), | 2446 | SWITCH_LOG_BUFSIZE * sizeof(struct switch_log_entry), |
| 2447 | GFP_KERNEL); | 2447 | GFP_KERNEL); |
| 2448 | 2448 | ||
| @@ -2451,6 +2451,7 @@ static int spufs_switch_log_open(struct inode *inode, struct file *file) | |||
| 2451 | goto out; | 2451 | goto out; |
| 2452 | } | 2452 | } |
| 2453 | 2453 | ||
| 2454 | ctx->switch_log->head = ctx->switch_log->tail = 0; | ||
| 2454 | init_waitqueue_head(&ctx->switch_log->wait); | 2455 | init_waitqueue_head(&ctx->switch_log->wait); |
| 2455 | rc = 0; | 2456 | rc = 0; |
| 2456 | 2457 | ||
