Skip to content

Commit

Permalink
io_uring: Fix unsigned 'res' comparison with zero in io_fixup_rw_res()
Browse files Browse the repository at this point in the history
Smatch warning: io_fixup_rw_res() warn:
	unsigned 'res' is never less than zero.

Change type of 'res' from unsigned to long.

Fixes: d6b7efc ("io_uring/rw: fix error'ed retry return values")
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
harshimogalapalli authored and gregkh committed Jan 12, 2023
1 parent b2b6eef commit e326ee0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion io_uring/io_uring.c
Expand Up @@ -2701,7 +2701,7 @@ static bool __io_complete_rw_common(struct io_kiocb *req, long res)
return false;
}

static inline int io_fixup_rw_res(struct io_kiocb *req, unsigned res)
static inline int io_fixup_rw_res(struct io_kiocb *req, long res)
{
struct io_async_rw *io = req->async_data;

Expand Down

0 comments on commit e326ee0

Please sign in to comment.