In the function storvsc_channel_init(), error code was not getting
set correctly in some of the failure cases. Fix this issue.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
}
if (vstor_packet->operation != VSTOR_OPERATION_COMPLETE_IO ||
}
if (vstor_packet->operation != VSTOR_OPERATION_COMPLETE_IO ||
- vstor_packet->status != 0)
+ vstor_packet->status != 0) {
+ ret = -EINVAL;
for (i = 0; i < ARRAY_SIZE(vmstor_protocols); i++) {
for (i = 0; i < ARRAY_SIZE(vmstor_protocols); i++) {
}
if (vstor_packet->operation != VSTOR_OPERATION_COMPLETE_IO ||
}
if (vstor_packet->operation != VSTOR_OPERATION_COMPLETE_IO ||
- vstor_packet->status != 0)
+ vstor_packet->status != 0) {
+ ret = -EINVAL;
/*
* Check to see if multi-channel support is there.
/*
* Check to see if multi-channel support is there.
}
if (vstor_packet->operation != VSTOR_OPERATION_COMPLETE_IO ||
}
if (vstor_packet->operation != VSTOR_OPERATION_COMPLETE_IO ||
- vstor_packet->status != 0)
+ vstor_packet->status != 0) {
+ ret = -EINVAL;
if (process_sub_channels)
handle_multichannel_storage(device, max_chns);
if (process_sub_channels)
handle_multichannel_storage(device, max_chns);