* Patch "regulator: Fix regulator_summary for deviceless consumers" has been added to the 4.9-stable tree
@ 2017-03-08 10:28 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-03-08 10:28 UTC (permalink / raw)
To: leonard.crestez, broonie, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
regulator: Fix regulator_summary for deviceless consumers
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
regulator-fix-regulator_summary-for-deviceless-consumers.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From e42a46b6f52473661ad192f76a128a68fe301df4 Mon Sep 17 00:00:00 2001
From: Leonard Crestez <leonard.crestez@nxp.com>
Date: Tue, 14 Feb 2017 17:31:03 +0200
Subject: regulator: Fix regulator_summary for deviceless consumers
From: Leonard Crestez <leonard.crestez@nxp.com>
commit e42a46b6f52473661ad192f76a128a68fe301df4 upstream.
It is allowed to call regulator_get with a NULL dev argument
(_regulator_get explicitly checks for it) but this causes an error later
when printing /sys/kernel/debug/regulator_summary.
Fix this by explicitly handling "deviceless" consumers in the debugfs code.
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/regulator/core.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -4357,12 +4357,13 @@ static void regulator_summary_show_subtr
seq_puts(s, "\n");
list_for_each_entry(consumer, &rdev->consumer_list, list) {
- if (consumer->dev->class == ®ulator_class)
+ if (consumer->dev && consumer->dev->class == ®ulator_class)
continue;
seq_printf(s, "%*s%-*s ",
(level + 1) * 3 + 1, "",
- 30 - (level + 1) * 3, dev_name(consumer->dev));
+ 30 - (level + 1) * 3,
+ consumer->dev ? dev_name(consumer->dev) : "deviceless");
switch (rdev->desc->type) {
case REGULATOR_VOLTAGE:
Patches currently in stable-queue which might be from leonard.crestez@nxp.com are
queue-4.9/regulator-fix-regulator_summary-for-deviceless-consumers.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-03-08 10:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-08 10:28 Patch "regulator: Fix regulator_summary for deviceless consumers" has been added to the 4.9-stable tree gregkh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.