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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 19 Feb 2012 23:45:53 -0700
From:	Stephen Warren <swarren@...dia.com>
To:	Linus Walleij <linus.walleij@...ricsson.com>
Cc:	B29396@...escale.com, s.hauer@...gutronix.de, dongas86@...il.com,
	shawn.guo@...aro.org, thomas.abraham@...aro.org, tony@...mide.com,
	linux-kernel@...r.kernel.org, Stephen Warren <swarren@...dia.com>
Subject: [PATCH 13/20] pinctrl: Error if mapping table's control dev can't be found

This is a serious error, and the pin control system will not function
correctly if it ends up not programing the mapping table entries into
the HW. Instead of just ignoring this, error out.

Signed-off-by: Stephen Warren <swarren@...dia.com>
---
 drivers/pinctrl/core.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index ce6016d..5a435f4 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -517,11 +517,12 @@ static struct pinctrl *pinctrl_get_locked(struct device *dev, const char *name)
 		 */
 		pctldev = get_pinctrl_dev_from_devname(map->ctrl_dev_name);
 		if (!pctldev) {
-			dev_warn(dev, "unknown pinctrl device %s in map entry",
-				 map->ctrl_dev_name);
-
-			/* Continue to check the other mappings anyway... */
-			continue;
+			dev_err(dev, "unknown pinctrl device %s in map entry",
+				map->ctrl_dev_name);
+			pinmux_put(p);
+			kfree(p);
+			/* Eventually, this should trigger deferred probe */
+			return -ENODEV;
 		}
 
 		dev_dbg(dev, "in map, found pctldev %s to handle function %s",
-- 
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ