netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tilman Schmidt <tilman@imap.cc>
To: davem@davemloft.net, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org
Cc: Hansjoerg Lipp <hjlipp@web.de>
Subject: [PATCH 2/8] gigaset: fix possible oops in error handling
Date: Thu, 14 May 2009 00:44:17 +0200 (CEST)	[thread overview]
Message-ID: <20090514-patch-02.tilman@imap.cc> (raw)
In-Reply-To: <20090514-patch-00.tilman@imap.cc>

Use pr_warning() / pr_err() instead of dev_warn() / dev_err() in two
places where the dev pointer isn't guaranteed to be valid.

Impact: error handling bugfix
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
---
 drivers/isdn/gigaset/interface.c |    3 +--
 drivers/isdn/gigaset/proc.c      |    2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/isdn/gigaset/interface.c b/drivers/isdn/gigaset/interface.c
index 820a309..5a8e259 100644
--- a/drivers/isdn/gigaset/interface.c
+++ b/drivers/isdn/gigaset/interface.c
@@ -599,8 +599,7 @@ void gigaset_if_init(struct cardstate *cs)
 	if (!IS_ERR(cs->tty_dev))
 		dev_set_drvdata(cs->tty_dev, cs);
 	else {
-		dev_warn(cs->dev,
-			 "could not register device to the tty subsystem\n");
+		pr_warning("could not register device to the tty subsystem\n");
 		cs->tty_dev = NULL;
 	}
 	mutex_unlock(&cs->mutex);
diff --git a/drivers/isdn/gigaset/proc.c b/drivers/isdn/gigaset/proc.c
index da6f3ac..9715aad 100644
--- a/drivers/isdn/gigaset/proc.c
+++ b/drivers/isdn/gigaset/proc.c
@@ -79,5 +79,5 @@ void gigaset_init_dev_sysfs(struct cardstate *cs)
 
 	gig_dbg(DEBUG_INIT, "setting up sysfs");
 	if (device_create_file(cs->tty_dev, &dev_attr_cidmode))
-		dev_err(cs->dev, "could not create sysfs attribute\n");
+		pr_err("could not create sysfs attribute\n");
 }
-- 
1.6.2.1.214.ge986c


  parent reply	other threads:[~2009-05-13 22:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-13 22:44 [PATCH 0/8] Gigaset driver bugfixes and cleanups Tilman Schmidt
2009-05-13 22:44 ` [PATCH 4/8] gigaset: skip unnecessary hex formatting Tilman Schmidt
2009-05-13 22:44 ` Tilman Schmidt [this message]
2009-05-13 22:44 ` [PATCH 1/8] gigaset: documentation update Tilman Schmidt
2009-05-13 22:44 ` [PATCH 5/8] gigaset: remove obsolete references to m10x state table Tilman Schmidt
2009-05-13 22:44 ` [PATCH 3/8] gigaset: fix error return code Tilman Schmidt
2009-05-13 22:44 ` [PATCH 7/8] gigaset: remove UNDOCREQ config option Tilman Schmidt
2009-05-13 22:44 ` [PATCH 8/8] gigaset: move up Kconfig inclusion point Tilman Schmidt
2009-05-13 22:44 ` [PATCH 6/8] gigaset: remove unused structure member rcvbytes Tilman Schmidt
2009-05-18  3:51 ` [PATCH 0/8] Gigaset driver bugfixes and cleanups David Miller

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=20090514-patch-02.tilman@imap.cc \
    --to=tilman@imap.cc \
    --cc=davem@davemloft.net \
    --cc=hjlipp@web.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@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;
as well as URLs for NNTP newsgroup(s).