staging: hv: return error instead calling ASSERT in blkvsc_drv.c
authorBill Pemberton <wfp5p@virginia.edu>
Wed, 5 May 2010 19:27:42 +0000 (15:27 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 11 May 2010 18:36:14 +0000 (11:36 -0700)
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/blkvsc_drv.c

index 8f8637e51d9e0588159bab9e4ac2b830e48555da..b6a2cb8752d37ef23d5536f9d37957bb04653cd8 100644 (file)
@@ -1213,7 +1213,10 @@ static int blkvsc_cancel_pending_reqs(struct block_device_context *blkdev)
                                        (!comp_req->request.Status ? 0 : -EIO),
                                        comp_req->sector_count *
                                        blkdev->sector_size);
-                               ASSERT(ret != 0);
+
+                               /* FIXME: shouldn't this do more than return? */
+                               if (ret)
+                                       goto out;
                        }
 
                        kmem_cache_free(blkdev->request_pool, comp_req);
@@ -1245,6 +1248,7 @@ static int blkvsc_cancel_pending_reqs(struct block_device_context *blkdev)
                kmem_cache_free(blkdev->request_pool, pend_req);
        }
 
+out:
        return ret;
 }