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

Signed-off-by: Levente Kurusa <le...@linux.com>
---
 arch/powerpc/sysdev/qe_lib/qe_ic.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/sysdev/qe_lib/qe_ic.c 
b/arch/powerpc/sysdev/qe_lib/qe_ic.c
index b2b87c3..2e15262 100644
--- a/arch/powerpc/sysdev/qe_lib/qe_ic.c
+++ b/arch/powerpc/sysdev/qe_lib/qe_ic.c
@@ -493,6 +493,7 @@ static int __init init_qe_ic_sysfs(void)
        rc = device_register(&device_qe_ic);
        if (rc) {
                printk(KERN_ERR "Failed registering qe_ic sys device\n");
+               put_device(&device_qe_ic);
                return -ENODEV;
        }
        return 0;
-- 
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