diff options
author | Rolf Eike Beer <eike-kernel@sf-tec.de> | 2006-10-01 08:27:48 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-01 09:39:22 +0200 |
commit | 328a338f6f9943a0a77292315a25628b22f79fed (patch) | |
tree | f38a4b110b8d728a5be847e567eafb961b586e88 /drivers/rtc | |
parent | [PATCH] cciss: remove unneeded spaces in output for attached volumes (diff) | |
download | linux-328a338f6f9943a0a77292315a25628b22f79fed.tar.xz linux-328a338f6f9943a0a77292315a25628b22f79fed.zip |
[PATCH] rtc: remove superfluous call to call to cdev_del()
If cdev_add() fails there is no good reason to call cdev_del().
Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Cc: Alessandro Zummo <alessandro.zummo@towertech.it>
Cc: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-dev.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c index 61a58259c93f..062c0ab3fe35 100644 --- a/drivers/rtc/rtc-dev.c +++ b/drivers/rtc/rtc-dev.c @@ -406,7 +406,6 @@ static int rtc_dev_add_device(struct class_device *class_dev, rtc->char_dev.owner = rtc->owner; if (cdev_add(&rtc->char_dev, MKDEV(MAJOR(rtc_devt), rtc->id), 1)) { - cdev_del(&rtc->char_dev); dev_err(class_dev->dev, "failed to add char device %d:%d\n", MAJOR(rtc_devt), rtc->id); |