gigaset: fix possible oops in error handling
authorTilman Schmidt <tilman@imap.cc>
Wed, 13 May 2009 12:44:17 +0000 (12:44 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 May 2009 03:51:24 +0000 (20:51 -0700)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/gigaset/interface.c
drivers/isdn/gigaset/proc.c

index 820a30923feebff7006e2c5b3bad7751f16837c7..1ebfcab746623d8fd09acf35d6b753afc0963c12 100644 (file)
@@ -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);
index da6f3acf9fd05f23999a652b24ce0799aa575ca4..9715aad9c3f0c43b6d6617e15f43fae5242681c5 100644 (file)
@@ -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");
 }