Skip to content

Commit

Permalink
gigaset: fix possible oops in error handling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tilman Schmidt authored and David S. Miller committed May 18, 2009
1 parent 528efc6 commit 42e3d61
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions drivers/isdn/gigaset/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion drivers/isdn/gigaset/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

0 comments on commit 42e3d61

Please sign in to comment.