Merge branch 'irq-threaded-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[pandora-kernel.git] / drivers / s390 / cio / chp.c
index 3e5f304..4000283 100644 (file)
@@ -417,7 +417,8 @@ int chp_new(struct chp_id chpid)
        if (ret) {
                CIO_MSG_EVENT(0, "Could not register chp%x.%02x: %d\n",
                              chpid.cssid, chpid.id, ret);
-               goto out_free;
+               put_device(&chp->dev);
+               goto out;
        }
        ret = sysfs_create_group(&chp->dev.kobj, &chp_attr_group);
        if (ret) {