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: 6929cb00a5
("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>
This commit is contained in:
parent
5771a8c088
commit
2b01bfaeb4
|
@ -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;
|
||||
}
|
||||
|
||||
ascport->states[DEFAULT] =
|
||||
|
|
Loading…
Reference in New Issue