summaryrefslogtreecommitdiff
path: root/arch/um/drivers/cow_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/drivers/cow_user.c')
-rw-r--r--arch/um/drivers/cow_user.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/um/drivers/cow_user.c b/arch/um/drivers/cow_user.c
index d1c86bc..61951b7 100644
--- a/arch/um/drivers/cow_user.c
+++ b/arch/um/drivers/cow_user.c
@@ -362,7 +362,8 @@ int init_cow_file(int fd, char *cow_file, char *backing_file, int sectorsize,
if(err != sizeof(zero)){
cow_printf("Write of bitmap to new COW file '%s' failed, "
"err = %d\n", cow_file, -err);
- err = -EINVAL;
+ if (err >= 0)
+ err = -EINVAL;
goto out;
}