diff options
| -rw-r--r-- | drivers/block/xen-blkback/xenbus.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-blkback/xenbus.c index 8fe61b5dc5a6..1f3dfaa54d87 100644 --- a/drivers/block/xen-blkback/xenbus.c +++ b/drivers/block/xen-blkback/xenbus.c | |||
| @@ -504,11 +504,13 @@ static int xen_blkbk_remove(struct xenbus_device *dev) | |||
| 504 | 504 | ||
| 505 | dev_set_drvdata(&dev->dev, NULL); | 505 | dev_set_drvdata(&dev->dev, NULL); |
| 506 | 506 | ||
| 507 | if (be->blkif) | 507 | if (be->blkif) { |
| 508 | xen_blkif_disconnect(be->blkif); | 508 | xen_blkif_disconnect(be->blkif); |
| 509 | 509 | ||
| 510 | /* Put the reference we set in xen_blkif_alloc(). */ | 510 | /* Put the reference we set in xen_blkif_alloc(). */ |
| 511 | xen_blkif_put(be->blkif); | 511 | xen_blkif_put(be->blkif); |
| 512 | } | ||
| 513 | |||
| 512 | kfree(be->mode); | 514 | kfree(be->mode); |
| 513 | kfree(be); | 515 | kfree(be); |
| 514 | return 0; | 516 | return 0; |
