Commit 3e4273db authored by David Binder's avatar David Binder Committed by Greg Kroah-Hartman
Browse files

staging: unisys: visorbus: Remove unneeded checks for valid variable addr



The 'retry' variable created in handle_command() is statically allocated,
and its address is never set to NULL. Therefore conditionals to verify
the validity of the retry variable's address are unnecessary.

Reported-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarDavid Binder <david.binder@unisys.com>
Signed-off-by: default avatarDavid Kershner <david.kershner@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 36309d3b
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -1852,7 +1852,6 @@ parser_init_byte_stream(u64 addr, u32 bytes, bool local, bool *retry)
	int allocbytes = sizeof(struct parser_context) + bytes;
	struct parser_context *ctx;

	if (retry)
	*retry = false;

	/*
@@ -1862,13 +1861,11 @@ parser_init_byte_stream(u64 addr, u32 bytes, bool local, bool *retry)
	allocbytes++;
	if ((controlvm_payload_bytes_buffered + bytes)
	    > MAX_CONTROLVM_PAYLOAD_BYTES) {
		if (retry)
		*retry = true;
		return NULL;
	}
	ctx = kzalloc(allocbytes, GFP_KERNEL | __GFP_NORETRY);
	if (!ctx) {
		if (retry)
		*retry = true;
		return NULL;
	}