Commit 879e06db authored by Milan Broz's avatar Milan Broz

Wiping empty device should not fail.

parent 4beb0f70
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment