lkml.org 
[lkml]   [2012]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 13/20] pinctrl: Error if mapping table's control dev can't be found
Date
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@nvidia.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


\
 
 \ /
  Last update: 2012-02-20 07:53    [W:0.294 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site