diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-12-09 10:24:06 (GMT) |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-12-09 17:56:52 (GMT) |
commit | 8c0b39155048d5a24f25c6c60aa83729927b04cd (patch) | |
tree | 89726b208dc80bedd6da471bc627a7581aa6a20c | |
parent | 7b6c0f8034d78390f9185e2ec2edb0a3e4ad244e (diff) | |
download | linux-8c0b39155048d5a24f25c6c60aa83729927b04cd.tar.xz |
nvme: precedence bug in nvme_pr_clear()
The "|" operator has higher precedence than "?:" so this didn't work as
intended. I had previously fixed this bug, but it we copied the older
unfixed version when we moved the function between files.
Fixes: 1673f1f08c88 ('nvme: move block_device_operations and ns/ctrl freeing to common code')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r-- | drivers/nvme/host/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 47ebfb8..64891eb 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -671,7 +671,7 @@ static int nvme_pr_preempt(struct block_device *bdev, u64 old, u64 new, static int nvme_pr_clear(struct block_device *bdev, u64 key) { - u32 cdw10 = 1 | key ? 1 << 3 : 0; + u32 cdw10 = 1 | (key ? 1 << 3 : 0); return nvme_pr_command(bdev, cdw10, key, 0, nvme_cmd_resv_register); } |