summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/tegra
diff options
context:
space:
mode:
authorPrathamesh Shete <pshete@nvidia.com>2021-10-26 17:41:35 +0530
committerLinus Walleij <linus.walleij@linaro.org>2021-10-26 19:59:44 +0200
commitf0c142fcf4d6a671109d6bd00d77993e65fb9f47 (patch)
tree6c1b5b78eb1f30b97d02b2a16cb8dd4a2ab0d929 /drivers/pinctrl/tegra
parentd2388172389e98dbbb56a7e825e85cb0fcc166c2 (diff)
pinctrl: tegra: Fix warnings and error
Fix warnings are errors caused by commit a42c7d95d29e ("pinctrl: tegra: Use correct offset for pin group"). Signed-off-by: Prathamesh Shete <pshete@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/tegra')
-rw-r--r--drivers/pinctrl/tegra/pinctrl-tegra.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/pinctrl/tegra/pinctrl-tegra.c b/drivers/pinctrl/tegra/pinctrl-tegra.c
index 0471d9c7f0ba..8d734bfc33d2 100644
--- a/drivers/pinctrl/tegra/pinctrl-tegra.c
+++ b/drivers/pinctrl/tegra/pinctrl-tegra.c
@@ -279,7 +279,6 @@ static struct tegra_pingroup *tegra_pinctrl_get_group(struct pinctrl_dev *pctlde
unsigned int offset)
{
struct tegra_pmx *pmx = pinctrl_dev_get_drvdata(pctldev);
- struct tegra_pingroup *g;
unsigned int group, num_pins, j;
const unsigned int *pins;
int ret;
@@ -290,7 +289,7 @@ static struct tegra_pingroup *tegra_pinctrl_get_group(struct pinctrl_dev *pctlde
continue;
for (j = 0; j < num_pins; j++) {
if (offset == pins[j])
- return &pmx->soc->groups[group];
+ return (struct tegra_pingroup *)&pmx->soc->groups[group];
}
}
@@ -338,7 +337,7 @@ static void tegra_pinctrl_gpio_disable_free(struct pinctrl_dev *pctldev,
group = tegra_pinctrl_get_group(pctldev, offset);
if (!group)
- return -EINVAL;
+ return;
if (group->mux_reg < 0 || group->sfsel_bit < 0)
return;