If virStorageBackendISCSIDirectVolWipeZero() fails, it has
already reported an error which is probably specific enough. Do
not overwrite it with some generic one.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
switch ((virStorageVolWipeAlgorithm) algorithm) {
case VIR_STORAGE_VOL_WIPE_ALG_ZERO:
- if (virStorageBackendISCSIDirectVolWipeZero(vol, iscsi) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("failed to wipe volume %s"),
- vol->name);
+ if (virStorageBackendISCSIDirectVolWipeZero(vol, iscsi) < 0)
goto cleanup;
- }
break;
case VIR_STORAGE_VOL_WIPE_ALG_TRIM:
case VIR_STORAGE_VOL_WIPE_ALG_NNSA: