提交 17e37675 编写于 作者: R roel kluin 提交者: Benjamin Herrenschmidt

powerpc/spufs: Fix test in spufs_switch_log_read()

size_t len cannot be less than 0.
Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
Acked-by: NJeremy Kerr <jk@ozlabs.org>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 d67ebe72
......@@ -2494,7 +2494,7 @@ static ssize_t spufs_switch_log_read(struct file *file, char __user *buf,
struct spu_context *ctx = SPUFS_I(inode)->i_ctx;
int error = 0, cnt = 0;
if (!buf || len < 0)
if (!buf)
return -EINVAL;
error = spu_acquire(ctx);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册