Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 17e37675 authored by roel kluin's avatar roel kluin Committed by Benjamin Herrenschmidt
Browse files

powerpc/spufs: Fix test in spufs_switch_log_read()



size_t len cannot be less than 0.

Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Acked-by: default avatarJeremy Kerr <jk@ozlabs.org>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent d67ebe72
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);