mutex_lock(&q->sysfs_dir_lock);
- ret = kobject_add(&q->kobj, kobject_get(&dev->kobj), "%s", "queue");
+ ret = kobject_add(&q->kobj, &dev->kobj, "%s", "queue");
if (ret < 0)
goto unlock;
ret = sysfs_create_group(&q->kobj, &queue_attr_group);
if (ret) {
kobject_del(&q->kobj);
- kobject_put(&dev->kobj);
goto unlock;
}
mutex_unlock(&q->sysfs_lock);
mutex_unlock(&q->sysfs_dir_lock);
kobject_del(&q->kobj);
- kobject_put(&dev->kobj);
return ret;
}
q->sched_debugfs_dir = NULL;
q->rqos_debugfs_dir = NULL;
mutex_unlock(&q->debugfs_mutex);
-
- kobject_put(&disk_to_dev(disk)->kobj);
}