On Thu, 5 Apr 2007 23:27:32 +0800,
WANG Cong <[EMAIL PROTECTED]> wrote:

> Thank you very much! I know. So I should replace all kfree with kobject_put, 
> like this one:
> 
> -     sysfs_create_link(&p->kobj, &block_subsys.kset.kobj, "subsystem");
> +     if (sysfs_create_link(&p->kobj, &block_subsys.kset.kobj, "subsystem")) {
> +             kobject_uevent(&p->kobj, KOBJ_REMOVE);
> +             kobject_del(&p->kobj);
> +             kobject_put(&p->kobj);
> +             return;
> +     }
> 
> Is that all right?
> 

Yes, or use kobject_unregister().
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
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