diff --git a/lib/image-sparse.c b/lib/image-sparse.c index f8289064692..09225692e9b 100644 --- a/lib/image-sparse.c +++ b/lib/image-sparse.c @@ -211,7 +211,7 @@ int write_sparse_image(struct sparse_storage *info, blks = write_sparse_chunk_raw(info, blk, blkcnt, data, response); - if (blks < 0) + if (IS_ERR_VALUE(blks)) return -1; blk += blks;