]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
xen-blkfront: free resources if xlvbd_alloc_gendisk fails
authorBob Liu <bob.liu@oracle.com>
Wed, 27 Jul 2016 09:42:04 +0000 (17:42 +0800)
committerBob Liu <bob.liu@oracle.com>
Thu, 20 Oct 2016 08:04:20 +0000 (04:04 -0400)
Current code forgets to free resources in the failure path of
xlvbd_alloc_gendisk(), this patch fix it.

Signed-off-by: Bob Liu <bob.liu@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
(cherry picked from commit 4e876c2bd37fbb5c37a4554a79cf979d486f0e82)
Signed-off-by: Bob Liu <bob.liu@oracle.com>
Orabug: 24820937

 Conflicts:
drivers/block/xen-blkfront.c

drivers/block/xen-blkfront.c

index 0dc08d9f60efca9295a10f26afb05637e1d31fc7..e86b2ffd5a1e2529400aaa7a68caab7af3a8da9d 100644 (file)
@@ -2691,7 +2691,7 @@ static void blkfront_connect(struct blkfront_info *info)
        if (err) {
                xenbus_dev_fatal(info->xbdev, err, "xlvbd_add at %s",
                                 info->xbdev->otherend);
-               return;
+               goto fail;
        }
 
        err = device_create_file(&info->xbdev->dev, &dev_attr_max_ring_page_order);