Skip to content

Commit

Permalink
blktrace: small cleanup in blk_msg_write()
Browse files Browse the repository at this point in the history
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: "Alan D. Brunelle" <alan.brunelle@hp.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
LKML-Reference: <49D5BB56.7000807@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Li Zefan authored and Ingo Molnar committed Apr 3, 2009
1 parent a4b3ada commit 7635b03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/trace/blktrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ static ssize_t blk_msg_write(struct file *filp, const char __user *buffer,
char *msg;
struct blk_trace *bt;

if (count > BLK_TN_MAX_MSG - 1)
if (count >= BLK_TN_MAX_MSG)
return -EINVAL;

msg = kmalloc(count + 1, GFP_KERNEL);
Expand Down

0 comments on commit 7635b03

Please sign in to comment.