diff options
author | David S. Miller <davem@davemloft.net> | 2013-02-14 23:49:01 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-02-28 18:32:26 +0400 |
commit | ddab81f4d0998efd4d3e288a26379fb4957cb5f7 (patch) | |
tree | d489dad2826eb16af2cc4f675cf6fa3473d5e859 /drivers/block | |
parent | 131fb7cce88c8c953429ecee478477db81727273 (diff) | |
download | linux-ddab81f4d0998efd4d3e288a26379fb4957cb5f7.tar.xz |
sunvdc: Fix off-by-one in generic_request().
[ Upstream commit f4d9605434c0fd4cc8639bf25cfc043418c52362 ]
The 'operations' bitmap corresponds one-for-one with the operation
codes, no adjustment is necessary.
Reported-by: Mark Kettenis <mark.kettenis@xs4all.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/sunvdc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/sunvdc.c b/drivers/block/sunvdc.c index 48e8fee9f2d4..94f6ae2bd0ce 100644 --- a/drivers/block/sunvdc.c +++ b/drivers/block/sunvdc.c @@ -461,7 +461,7 @@ static int generic_request(struct vdc_port *port, u8 op, void *buf, int len) int op_len, err; void *req_buf; - if (!(((u64)1 << ((u64)op - 1)) & port->operations)) + if (!(((u64)1 << (u64)op) & port->operations)) return -EOPNOTSUPP; switch (op) { |