Skip to content

Commit

Permalink
RAW driver: Remove call to kobject_put().
Browse files Browse the repository at this point in the history
If cdev_add() fails, there is no justification for subsequently
calling kobject_put().

Signed-off-by: Robert P. J. Day <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
rpjday authored and gregkh committed May 7, 2011
1 parent b50fa7c commit 9333744
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/char/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 9333744

Please sign in to comment.