Commit 9333744d authored by Robert P. J. Day's avatar Robert P. J. Day Committed by 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: default avatarRobert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b50fa7c8
...@@ -339,7 +339,6 @@ static int __init raw_init(void) ...@@ -339,7 +339,6 @@ static int __init raw_init(void)
cdev_init(&raw_cdev, &raw_fops); cdev_init(&raw_cdev, &raw_fops);
ret = cdev_add(&raw_cdev, dev, max_raw_minors); ret = cdev_add(&raw_cdev, dev, max_raw_minors);
if (ret) { if (ret) {
kobject_put(&raw_cdev.kobj);
goto error_region; goto error_region;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment