diff options
author | Robert P. J. Day <rpjday@crashcourse.ca> | 2011-05-04 05:19:34 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-06 20:52:32 -0400 |
commit | 9333744dc7dcd85531cff13cabf1d5d6baf18e7d (patch) | |
tree | 4b7315617accc91e9d0524eb907ca624a36aa9e9 | |
parent | b50fa7c8077c625919b1e0a75fc37b825f024518 (diff) |
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>
-rw-r--r-- | drivers/char/raw.c | 1 |
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) | |||
339 | cdev_init(&raw_cdev, &raw_fops); | 339 | cdev_init(&raw_cdev, &raw_fops); |
340 | ret = cdev_add(&raw_cdev, dev, max_raw_minors); | 340 | ret = cdev_add(&raw_cdev, dev, max_raw_minors); |
341 | if (ret) { | 341 | if (ret) { |
342 | kobject_put(&raw_cdev.kobj); | ||
343 | goto error_region; | 342 | goto error_region; |
344 | } | 343 | } |
345 | 344 | ||