diff options
| author | Sherry Sun <sherry.sun@nxp.com> | 2022-03-21 19:22:11 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-15 11:41:12 +0200 |
| commit | f398e0aa325c61fa20903833a5b534ecb8e6e418 (patch) | |
| tree | 8aa5ba982655a19ceb34f70294463addfb9bf7bc /tools/perf/scripts/python | |
| parent | 18c9d4a3c249e9dcb1006bfd7d781616e152d77b (diff) | |
tty: serial: fsl_lpuart: fix potential bug when using both of_alias_get_id and ida_simple_get
Now fsl_lpuart driver use both of_alias_get_id() and ida_simple_get() in
.probe(), which has the potential bug. For example, when remove the
lpuart7 alias in dts, of_alias_get_id() will return error, then call
ida_simple_get() to allocate the id 0 for lpuart7, this may confilct
with the lpuart4 which has alias 0.
aliases {
...
serial0 = &lpuart4;
serial1 = &lpuart5;
serial2 = &lpuart6;
serial3 = &lpuart7;
}
So remove the ida_simple_get() in .probe(), return an error directly
when calling of_alias_get_id() fails, which is consistent with other
uart drivers behavior.
Fixes: 3bc3206e1c0f ("serial: fsl_lpuart: Remove the alias node dependence")
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Link: https://lore.kernel.org/r/20220321112211.8895-1-sherry.sun@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
