From: Rolf Eike Beer <eike-kernel@sf-tec.de>
To: Alessandro Zummo <a.zummo@towertech.it>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: [RTC] Remove superfluous call to call to cdev_del()
Date: Thu, 21 Sep 2006 09:46:06 +0200 [thread overview]
Message-ID: <200609210946.06924.eike-kernel@sf-tec.de> (raw)
If cdev_add() fails there is no good reason to call cdev_del().
Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
---
commit 7d8c15d5af591c6039a4bba6ab20e4952ed11c1f
tree 8849441bf17c6c8145f09123a320c34572746c7c
parent 10e3d9d489c71aaf7ff86c81178ae5aeefe1ad6f
author Rolf Eike Beer <eike-kernel@sf-tec.de> Thu, 21 Sep 2006 09:42:49 +0200
committer Rolf Eike Beer <eike-kernel@sf-tec.de> Thu, 21 Sep 2006 09:42:49 +0200
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 61a5825..062c0ab 100644
--- a/drivers/rtc/rtc-dev.c
+++ b/drivers/rtc/rtc-dev.c
@@ -406,7 +406,6 @@ #endif
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);
next reply other threads:[~2006-09-21 7:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-21 7:46 Rolf Eike Beer [this message]
2006-09-21 7:56 ` [RTC] Remove superfluous call to call to cdev_del() Alessandro Zummo
2006-09-21 8:30 ` Rolf Eike Beer
2006-09-21 14:44 ` Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200609210946.06924.eike-kernel@sf-tec.de \
--to=eike-kernel@sf-tec.de \
--cc=a.zummo@towertech.it \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox