From: Robert P. J. Day Date: Wed, 4 May 2011 09:19:34 +0000 (-0400) Subject: RAW driver: Remove call to kobject_put(). X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9333744dc7dcd85531cff13cabf1d5d6baf18e7d;p=mv-sheeva.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/char/raw.c b/drivers/char/raw.c index 6f9db621155..b33e8ea314e 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; }