This is required so that we give up the last reference to the device.

Signed-off-by: Levente Kurusa <le...@linux.com>
---
 arch/parisc/kernel/drivers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c
index 14285ca..b97cc05 100644
--- a/arch/parisc/kernel/drivers.c
+++ b/arch/parisc/kernel/drivers.c
@@ -428,7 +428,7 @@ struct parisc_device * create_tree_node(char id, struct 
device *parent)
        dev->dev.dma_mask = &dev->dma_mask;
        dev->dev.coherent_dma_mask = dev->dma_mask;
        if (device_register(&dev->dev)) {
-               kfree(dev);
+               put_device(&dev->dev);
                return NULL;
        }
 
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to