diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index 7c518bfa788f0ed83493768d992025a55ae43e3b..7d4ae50c53727d873b0d848a6ec6c87596d9d1f0 100644
--- a/src/storage/storage_driver.c
+++ b/src/storage/storage_driver.c
@@ -2088,8 +2088,9 @@ storageVolUpload(virStorageVolPtr obj,
             goto cleanup;
     }
 
-    ret = backend->uploadVol(obj->conn, pool, vol, stream,
-                             offset, length, flags);
+    if ((ret = backend->uploadVol(obj->conn, pool, vol, stream,
+                                  offset, length, flags)) < 0)
+        goto cleanup;
 
     /* Add cleanup callback - call after uploadVol since the stream
      * is then fully set up