Skip to content

Commit 163f80d

Browse files
calebsanderaxboe
authored andcommitted
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>
1 parent a755da0 commit 163f80d

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

drivers/block/ublk_drv.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2495,9 +2495,6 @@ static struct request *ublk_check_and_get_req(struct kiocb *iocb,
24952495
return ERR_PTR(-EINVAL);
24962496

24972497
ubq = ublk_get_queue(ub, q_id);
2498-
if (!ubq)
2499-
return ERR_PTR(-EINVAL);
2500-
25012498
if (!ublk_support_user_copy(ubq))
25022499
return ERR_PTR(-EACCES);
25032500

0 commit comments

Comments
 (0)