lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 03 Mar 2017 22:20:44 +0100
From:   Harald Geyer <harald@...ib.org>
To:     Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Heiko Stuebner <heiko@...ech.de>
Cc:     <linux-kernel@...r.kernel.org>
Subject: [bug] regulator: fixed, gpio: probe fails on unset regulator-name

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ