Skip to content

Commit

Permalink
pd: don't check blk_execute_rq return value.
Browse files Browse the repository at this point in the history
The driver never sets req->errors, so blk_execute_rq will always return 0.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Bart Van Assche <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Christoph Hellwig authored and axboe committed Apr 20, 2017
1 parent 7c4cc30 commit 75a500e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/block/paride/pd.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,18 +739,15 @@ static int pd_special_command(struct pd_unit *disk,
enum action (*func)(struct pd_unit *disk))
{
struct request *rq;
int err = 0;

rq = blk_get_request(disk->gd->queue, REQ_OP_DRV_IN, __GFP_RECLAIM);
if (IS_ERR(rq))
return PTR_ERR(rq);

rq->special = func;

err = blk_execute_rq(disk->gd->queue, disk->gd, rq, 0);

blk_execute_rq(disk->gd->queue, disk->gd, rq, 0);
blk_put_request(rq);
return err;
return 0;
}

/* kernel glue structures */
Expand Down

0 comments on commit 75a500e

Please sign in to comment.