aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-07-17 04:12:38 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-07-17 07:19:19 -0400
commit2b01bfaeb41e1563322448d9b392ac924cbf22ef (patch)
tree20b8d4ee07b8cb5daac89be69597a3bcf4ed0ed9
parent5771a8c08880cdca3bfb4a3fc6d309d6bba20877 (diff)
serial: st-asc: Potential error pointer dereference
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> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/serial/st-asc.c1
1 files changed, 1 insertions, 0 deletions
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,
758 if (IS_ERR(ascport->pinctrl)) { 758 if (IS_ERR(ascport->pinctrl)) {
759 ret = PTR_ERR(ascport->pinctrl); 759 ret = PTR_ERR(ascport->pinctrl);
760 dev_err(&pdev->dev, "Failed to get Pinctrl: %d\n", ret); 760 dev_err(&pdev->dev, "Failed to get Pinctrl: %d\n", ret);
761 return ret;
761 } 762 }
762 763
763 ascport->states[DEFAULT] = 764 ascport->states[DEFAULT] =