From: Lee Jones <lee.jones@linaro.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Patrice Chotard <patrice.chotard@st.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.com>,
linux-serial@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] serial: st-asc: Potential error pointer dereference
Date: Mon, 17 Jul 2017 11:28:56 +0100 [thread overview]
Message-ID: <20170717102856.fjxpo2miyn4vmaid@dell> (raw)
In-Reply-To: <20170717081238.bjjp5vvzq56yv2q3@mwanda>
On Mon, 17 Jul 2017, Dan Carpenter wrote:
> It looks like we intended to return an error code here, because we
> dereference "ascport->pinctrl" on the next lines.
>
> Fixes: 6929cb00a501 ("serial: st-asc: Read in all Pinctrl states")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c
> index f5335be344f6..6b0ca65027d0 100644
> --- a/drivers/tty/serial/st-asc.c
> +++ b/drivers/tty/serial/st-asc.c
> @@ -758,6 +758,7 @@ static int asc_init_port(struct asc_port *ascport,
> if (IS_ERR(ascport->pinctrl)) {
> ret = PTR_ERR(ascport->pinctrl);
> dev_err(&pdev->dev, "Failed to get Pinctrl: %d\n", ret);
> + return ret;
> }
Good spot.
Acked-by: Lee Jones <lee.jones@linaro.org>
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
prev parent reply other threads:[~2017-07-17 10:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-17 8:12 [PATCH] serial: st-asc: Potential error pointer dereference Dan Carpenter
2017-07-17 10:28 ` Lee Jones [this message]
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=20170717102856.fjxpo2miyn4vmaid@dell \
--to=lee.jones@linaro.org \
--cc=dan.carpenter@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=patrice.chotard@st.com \
/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