summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorRobert P. J. Day <rpjday@crashcourse.ca>2011-05-04 11:19:34 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-05-07 02:52:32 +0200
commit9333744dc7dcd85531cff13cabf1d5d6baf18e7d (patch)
tree4b7315617accc91e9d0524eb907ca624a36aa9e9 /drivers/char
parentreboot: disable usermodehelper to prevent fs access (diff)
downloadlinux-9333744dc7dcd85531cff13cabf1d5d6baf18e7d.tar.xz
linux-9333744dc7dcd85531cff13cabf1d5d6baf18e7d.zip
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>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/raw.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/char/raw.c b/drivers/char/raw.c
index 6f9db621155a..b33e8ea314ed 100644
--- a/drivers/char/raw.c
+++ b/drivers/char/raw.c
@@ -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;
}