From: Alexandre TORGUE <alexandre.torgue@st.com>
To: Linus Walleij <linus.walleij@linaro.org>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Patrice Chotard <patrice.chotard@st.com>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
Rob Herring <robh+dt@kernel.org>
Cc: linux-gpio@vger.kernel.org, dan.carpenter@oracle.com,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org
Subject: [PATCH] pinctrl: stm32: Fix bad function call
Date: Tue, 30 May 2017 16:43:04 +0200 [thread overview]
Message-ID: <1496155384-30711-1-git-send-email-alexandre.torgue@st.com> (raw)
In stm32_pconf_parse_conf function, stm32_pmx_gpio_set_direction is
called with wrong parameter value. Indeed, using NULL value for range
will raise an oops.
Fixes: aceb16dc2da5 ("pinctrl: Add STM32 MCUs support")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alexandre TORGUE <alexandre.torgue@st.com>
diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.c b/drivers/pinctrl/stm32/pinctrl-stm32.c
index d3c5f5d..222b668 100644
--- a/drivers/pinctrl/stm32/pinctrl-stm32.c
+++ b/drivers/pinctrl/stm32/pinctrl-stm32.c
@@ -798,7 +798,7 @@ static int stm32_pconf_parse_conf(struct pinctrl_dev *pctldev,
break;
case PIN_CONFIG_OUTPUT:
__stm32_gpio_set(bank, offset, arg);
- ret = stm32_pmx_gpio_set_direction(pctldev, NULL, pin, false);
+ ret = stm32_pmx_gpio_set_direction(pctldev, range, pin, false);
break;
default:
ret = -EINVAL;
--
1.9.1
next reply other threads:[~2017-05-30 14:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-30 14:43 Alexandre TORGUE [this message]
[not found] ` <1496155384-30711-1-git-send-email-alexandre.torgue-qxv4g6HH51o@public.gmane.org>
2017-05-31 0:27 ` [PATCH] pinctrl: stm32: Fix bad function call Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1496155384-30711-1-git-send-email-alexandre.torgue@st.com \
--to=alexandre.torgue@st.com \
--cc=dan.carpenter@oracle.com \
--cc=devicetree@vger.kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcoquelin.stm32@gmail.com \
--cc=patrice.chotard@st.com \
--cc=paul.gortmaker@windriver.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).