Commit 25f32223 authored by weiping zhang's avatar weiping zhang Committed by Michael S. Tsirkin
Browse files

virtio_mmio: add cleanup for virtio_mmio_remove

cleanup all resource allocated by virtio_mmio_probe.
Signed-off-by: default avatarweiping zhang <>
Signed-off-by: default avatarMichael S. Tsirkin <>
Reviewed-by: default avatarCornelia Huck <>
parent 7eb781b1
......@@ -610,7 +610,13 @@ static int virtio_mmio_probe(struct platform_device *pdev)
static int virtio_mmio_remove(struct platform_device *pdev)
struct virtio_mmio_device *vm_dev = platform_get_drvdata(pdev);
struct resource *mem;
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (mem)
devm_release_mem_region(&pdev->dev, mem->start,
return 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment