Skip to content

Commit

Permalink
block: blk-exec.c: Cleaning up local variable address returnd
Browse files Browse the repository at this point in the history
Address of local variable assigned to a function parameter

This was partly found using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Rickard Strandqvist authored and axboe committed Jun 9, 2014
1 parent f45c40a commit de83953
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions block/blk-exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ int blk_execute_rq(struct request_queue *q, struct gendisk *bd_disk,
if (rq->errors)
err = -EIO;

if (rq->sense == sense) {
rq->sense = NULL;
rq->sense_len = 0;
}

return err;
}
EXPORT_SYMBOL(blk_execute_rq);

0 comments on commit de83953

Please sign in to comment.