From: Harald Geyer <harald@ccbib.org>
To: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Heiko Stuebner <heiko@sntech.de>
Cc: <linux-kernel@vger.kernel.org>
Subject: [bug] regulator: fixed, gpio: probe fails on unset regulator-name
Date: Fri, 03 Mar 2017 22:20:44 +0100 [thread overview]
Message-ID: <6fab0e65f184ec621463799512ffad43@ccbib.org> (raw)
Hi!
Documentation/devicetree/bindings/regulator/regulator.txt says that the
regulator-name property is optional. However fixed and gpio regulators
fail in probe with the following message, if the property is not
present:
| reg-fixed-voltage regulators:sensor_supply: Failed to allocate supply
name
| reg-fixed-voltage: probe of regulators:sensor_supply failed with
error -12
This is caused by the following code in both drivers:
drvdata->desc.name = devm_kstrdup(&pdev->dev,
config->supply_name,
GFP_KERNEL);
if (drvdata->desc.name == NULL) {
dev_err(&pdev->dev, "Failed to allocate supply
name\n");
return -ENOMEM;
}
If config->supply_name == NULL, then devm_kstrdup() also returns NULL.
I don't know whether the binding document or the implementation is
wrong,
so can't propose a fix for this. Sorry.
TIA,
Harald
--
If you want to support my work:
see http://friends.ccbib.org/harald/supporting/
or donate via peercoin to P98LRdhit3gZbHDBe7ta5jtXrMJUms4p7w
or CLAM xASPBtezLNqj4cUe8MT5nZjthRSEjrRQXN
next reply other threads:[~2017-03-03 21:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-03 21:20 Harald Geyer [this message]
2017-03-06 10:15 ` Mark Brown
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=6fab0e65f184ec621463799512ffad43@ccbib.org \
--to=harald@ccbib.org \
--cc=broonie@kernel.org \
--cc=heiko@sntech.de \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®