mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-28 07:13:34 +00:00
io_uring: remove unnecessary NULL checks
The "kmsg" pointer can't be NULL and we have already dereferenced it so a check here would be useless. Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
7fbeb95d0f
commit
297a31e3e8
1 changed files with 2 additions and 2 deletions
|
@ -3075,7 +3075,7 @@ static int io_sendmsg(struct io_kiocb *req, struct io_kiocb **nxt,
|
|||
if (req->io)
|
||||
return -EAGAIN;
|
||||
if (io_alloc_async_ctx(req)) {
|
||||
if (kmsg && kmsg->iov != kmsg->fast_iov)
|
||||
if (kmsg->iov != kmsg->fast_iov)
|
||||
kfree(kmsg->iov);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
@ -3229,7 +3229,7 @@ static int io_recvmsg(struct io_kiocb *req, struct io_kiocb **nxt,
|
|||
if (req->io)
|
||||
return -EAGAIN;
|
||||
if (io_alloc_async_ctx(req)) {
|
||||
if (kmsg && kmsg->iov != kmsg->fast_iov)
|
||||
if (kmsg->iov != kmsg->fast_iov)
|
||||
kfree(kmsg->iov);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue