Removed intializations from visorchipset_open(), visorchipset_init()
and moved the memset in initialize_controlvm_payload_info() down in
case of early returns from the function.
Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
if (minor_number)
return -ENODEV;
- file->private_data = NULL;
return 0;
}
if (!info)
return -CONTROLVM_RESP_ERROR_PAYLOAD_INVALID;
- memset(info, 0, sizeof(struct visor_controlvm_payload_info));
if ((offset == 0) || (bytes == 0))
return -CONTROLVM_RESP_ERROR_PAYLOAD_INVALID;
if (!payload)
return -CONTROLVM_RESP_ERROR_IOREMAP_FAILED;
+ memset(info, 0, sizeof(struct visor_controlvm_payload_info));
info->offset = offset;
info->bytes = bytes;
info->ptr = payload;
if (!addr)
goto error;
- memset(&controlvm_payload_info, 0, sizeof(controlvm_payload_info));
-
controlvm_channel = visorchannel_create_with_lock(addr, 0,
GFP_KERNEL, uuid);
if (!controlvm_channel)