Wiping empty device should not fail.

This commit is contained in:
Milan Broz
2018-10-11 15:38:56 +02:00
parent 4beb0f702a
commit 879e06db39

View File

@@ -161,7 +161,7 @@ int crypt_wipe_device(struct crypt_device *cd,
return errno ? -errno : -EINVAL;
r = device_size(device, &dev_size);
if (r)
if (r || dev_size == 0)
goto out;
if (length) {