staging: unisys: refactor initialize_controlvm_payload_info()
Fix the CamelCased goto label: Away => cleanup and get rid of the NULL comparison. Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
61715c8b9c
commit
f118a39bfe
|
@ -1269,26 +1269,26 @@ initialize_controlvm_payload_info(HOSTADDRESS phys_addr, u64 offset, u32 bytes,
|
||||||
|
|
||||||
if (!info) {
|
if (!info) {
|
||||||
rc = -CONTROLVM_RESP_ERROR_PAYLOAD_INVALID;
|
rc = -CONTROLVM_RESP_ERROR_PAYLOAD_INVALID;
|
||||||
goto Away;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
memset(info, 0, sizeof(struct controlvm_payload_info));
|
memset(info, 0, sizeof(struct controlvm_payload_info));
|
||||||
if ((offset == 0) || (bytes == 0)) {
|
if ((offset == 0) || (bytes == 0)) {
|
||||||
rc = -CONTROLVM_RESP_ERROR_PAYLOAD_INVALID;
|
rc = -CONTROLVM_RESP_ERROR_PAYLOAD_INVALID;
|
||||||
goto Away;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
payload = ioremap_cache(phys_addr + offset, bytes);
|
payload = ioremap_cache(phys_addr + offset, bytes);
|
||||||
if (!payload) {
|
if (!payload) {
|
||||||
rc = -CONTROLVM_RESP_ERROR_IOREMAP_FAILED;
|
rc = -CONTROLVM_RESP_ERROR_IOREMAP_FAILED;
|
||||||
goto Away;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
info->offset = offset;
|
info->offset = offset;
|
||||||
info->bytes = bytes;
|
info->bytes = bytes;
|
||||||
info->ptr = payload;
|
info->ptr = payload;
|
||||||
|
|
||||||
Away:
|
cleanup:
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
if (payload != NULL) {
|
if (payload) {
|
||||||
iounmap(payload);
|
iounmap(payload);
|
||||||
payload = NULL;
|
payload = NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue