Skip to content

Commit 9333744

Browse files
robertpjdaygregkh
authored andcommitted
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>
1 parent b50fa7c commit 9333744

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

‎drivers/char/raw.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,6 @@ static int __init raw_init(void)
339339
cdev_init(&raw_cdev, &raw_fops);
340340
ret = cdev_add(&raw_cdev, dev, max_raw_minors);
341341
if (ret) {
342-
kobject_put(&raw_cdev.kobj);
343342
goto error_region;
344343
}
345344

0 commit comments

Comments
 (0)