| From | Greg Kroah-Hartman <> | Subject | [PATCH 4.12 110/196] serial: st-asc: Potential error pointer dereference | Date | Tue, 25 Jul 2017 12:21:49 -0700 |
| |
4.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <dan.carpenter@oracle.com>
commit 2b01bfaeb41e1563322448d9b392ac924cbf22ef upstream.
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> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--- drivers/tty/serial/st-asc.c | 1 + 1 file changed, 1 insertion(+)
--- 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 if (IS_ERR(ascport->pinctrl)) { ret = PTR_ERR(ascport->pinctrl); dev_err(&pdev->dev, "Failed to get Pinctrl: %d\n", ret); + return ret; } ascport->states[DEFAULT] =
|