| From | Stephen Warren <> | Subject | [PATCH 13/20] pinctrl: Error if mapping table's control dev can't be found | Date | Sun, 19 Feb 2012 23:45:53 -0700 |
| |
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
|