Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 42e3d611 authored by Tilman Schmidt's avatar Tilman Schmidt Committed by David S. Miller
Browse files

gigaset: fix possible oops in error handling



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: default avatarTilman Schmidt <tilman@imap.cc>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 528efc6a
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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");
}