ublk: remove ubq check in ublk_check_and_get_req()
ublk_get_queue() never returns a NULL pointer, so there's no need to check its return value in ublk_check_and_get_req(). Drop the check. Signed-off-by: Caleb Sander Mateos <csander@purestorage.com> Reviewed-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
a755da0dd0
commit
163f80dabf
|
|
@ -2495,9 +2495,6 @@ static struct request *ublk_check_and_get_req(struct kiocb *iocb,
|
|||
return ERR_PTR(-EINVAL);
|
||||
|
||||
ubq = ublk_get_queue(ub, q_id);
|
||||
if (!ubq)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
if (!ublk_support_user_copy(ubq))
|
||||
return ERR_PTR(-EACCES);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue