X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fzorro%2Fzorro.c;h=e0c2807b0970653d7b90194374859b1e2e9551e9;hb=80c226fbef56576946c9655fcb2ab62e63404d12;hp=6455f3a244c594334b04f6c6ac46c2bf527fd1f0;hpb=e78483c5aeb0d7fbb0e365802145f1045e62957e;p=pandora-kernel.git diff --git a/drivers/zorro/zorro.c b/drivers/zorro/zorro.c index 6455f3a244c5..e0c2807b0970 100644 --- a/drivers/zorro/zorro.c +++ b/drivers/zorro/zorro.c @@ -142,6 +142,7 @@ static int __init amiga_zorro_probe(struct platform_device *pdev) error = device_register(&bus->dev); if (error) { pr_err("Zorro: Error registering zorro_bus\n"); + put_device(&bus->dev); kfree(bus); return error; } @@ -175,6 +176,7 @@ static int __init amiga_zorro_probe(struct platform_device *pdev) if (error) { dev_err(&bus->dev, "Error registering device %s\n", z->name); + put_device(&z->dev); continue; } error = zorro_create_sysfs_dev_files(z);