|
@@ -952,8 +952,10 @@ static int storvsc_channel_init(struct hv_device *device)
|
|
|
}
|
|
|
|
|
|
if (vstor_packet->operation != VSTOR_OPERATION_COMPLETE_IO ||
|
|
|
- vstor_packet->status != 0)
|
|
|
+ vstor_packet->status != 0) {
|
|
|
+ ret = -EINVAL;
|
|
|
goto cleanup;
|
|
|
+ }
|
|
|
|
|
|
|
|
|
for (i = 0; i < ARRAY_SIZE(vmstor_protocols); i++) {
|
|
@@ -1032,8 +1034,10 @@ static int storvsc_channel_init(struct hv_device *device)
|
|
|
}
|
|
|
|
|
|
if (vstor_packet->operation != VSTOR_OPERATION_COMPLETE_IO ||
|
|
|
- vstor_packet->status != 0)
|
|
|
+ vstor_packet->status != 0) {
|
|
|
+ ret = -EINVAL;
|
|
|
goto cleanup;
|
|
|
+ }
|
|
|
|
|
|
/*
|
|
|
* Check to see if multi-channel support is there.
|
|
@@ -1070,8 +1074,10 @@ static int storvsc_channel_init(struct hv_device *device)
|
|
|
}
|
|
|
|
|
|
if (vstor_packet->operation != VSTOR_OPERATION_COMPLETE_IO ||
|
|
|
- vstor_packet->status != 0)
|
|
|
+ vstor_packet->status != 0) {
|
|
|
+ ret = -EINVAL;
|
|
|
goto cleanup;
|
|
|
+ }
|
|
|
|
|
|
if (process_sub_channels)
|
|
|
handle_multichannel_storage(device, max_chns);
|