提交 15730ddb 编写于 作者: C Cornelia Huck 提交者: Linus Torvalds

[PATCH] s390: improve response code handling in chsc_enable_facility()

Rather than checking for some known failures, check positively for the
success response code 0x0001 and return -EIO for unrecognized failure
response codes.
Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
Cc: Greg Smith <gsmith@nc.rr.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 de1d9c03
......@@ -1115,6 +1115,9 @@ chsc_enable_facility(int operation_code)
goto out;
}
switch (sda_area->response.code) {
case 0x0001: /* everything ok */
ret = 0;
break;
case 0x0003: /* invalid request block */
case 0x0007:
ret = -EINVAL;
......@@ -1123,6 +1126,8 @@ chsc_enable_facility(int operation_code)
case 0x0101: /* facility not provided */
ret = -EOPNOTSUPP;
break;
default: /* something went wrong */
ret = -EIO;
}
out:
free_page((unsigned long)sda_area);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册