提交 9333744d 编写于 作者: R Robert P. J. Day 提交者: Greg Kroah-Hartman

RAW driver: Remove call to kobject_put().

If cdev_add() fails, there is no justification for subsequently
calling kobject_put().
Signed-off-by: NRobert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 b50fa7c8
......@@ -339,7 +339,6 @@ static int __init raw_init(void)
cdev_init(&raw_cdev, &raw_fops);
ret = cdev_add(&raw_cdev, dev, max_raw_minors);
if (ret) {
kobject_put(&raw_cdev.kobj);
goto error_region;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册