Commit d2f6a1c6 authored by Marek Belisko's avatar Marek Belisko Committed by Linus Walleij

pinctrl: remove double pin validity check.

Function pin_is_valid just call pin_desc_get which is in pin_request
call some line below. Remove pin_is_valid() check.
Acked-by: default avatarStephen Warren <swarren@nvidia.com>
Signed-off-by: default avatarMarek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 7afde8ba
......@@ -108,16 +108,6 @@ static int pin_request(struct pinctrl_dev *pctldev,
dev_dbg(&pctldev->dev, "request pin %d for %s\n", pin, function);
if (!pin_is_valid(pctldev, pin)) {
dev_err(&pctldev->dev, "pin is invalid\n");
return -EINVAL;
}
if (!function) {
dev_err(&pctldev->dev, "no function name given\n");
return -EINVAL;
}
desc = pin_desc_get(pctldev, pin);
if (desc == NULL) {
dev_err(&pctldev->dev,
......@@ -125,6 +115,11 @@ static int pin_request(struct pinctrl_dev *pctldev,
goto out;
}
if (!function) {
dev_err(&pctldev->dev, "no function name given\n");
return -EINVAL;
}
spin_lock(&desc->lock);
if (desc->mux_function) {
spin_unlock(&desc->lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment