mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-16 23:45:31 +08: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
@ -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 New Issue
Block a user