forked from luck/tmp_suning_uos_patched
RAW driver: Remove call to kobject_put().
If cdev_add() fails, there is no justification for subsequently calling kobject_put(). Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
b50fa7c807
commit
9333744dc7
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user