Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f118a39b authored by Benjamin Romer's avatar Benjamin Romer Committed by Greg Kroah-Hartman
Browse files

staging: unisys: refactor initialize_controlvm_payload_info()



Fix the CamelCased goto label:

Away => cleanup

and get rid of the NULL comparison.

Signed-off-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 61715c8b
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -1269,26 +1269,26 @@ initialize_controlvm_payload_info(HOSTADDRESS phys_addr, u64 offset, u32 bytes,

	if (!info) {
		rc = -CONTROLVM_RESP_ERROR_PAYLOAD_INVALID;
		goto Away;
		goto cleanup;
	}
	memset(info, 0, sizeof(struct controlvm_payload_info));
	if ((offset == 0) || (bytes == 0)) {
		rc = -CONTROLVM_RESP_ERROR_PAYLOAD_INVALID;
		goto Away;
		goto cleanup;
	}
	payload = ioremap_cache(phys_addr + offset, bytes);
	if (!payload) {
		rc = -CONTROLVM_RESP_ERROR_IOREMAP_FAILED;
		goto Away;
		goto cleanup;
	}

	info->offset = offset;
	info->bytes = bytes;
	info->ptr = payload;

Away:
cleanup:
	if (rc < 0) {
		if (payload != NULL) {
		if (payload) {
			iounmap(payload);
			payload = NULL;
		}