diff options
author | Michael Walle <michael@walle.cc> | 2020-03-03 18:42:59 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-03-06 14:10:44 +0100 |
commit | 2b2e71fe657510a6f71aa16ef0309fa6bc20ab3d (patch) | |
tree | f3bf8423f7de926a03761b20ca3630ac6c1f876d /drivers/staging | |
parent | 0e28ed6c9df986e937e488ec2a0c35bd4bb2a0af (diff) | |
download | linux-2b2e71fe657510a6f71aa16ef0309fa6bc20ab3d.tar.bz2 |
tty: serial: fsl_lpuart: free IDs allocated by IDA
Since commit 3bc3206e1c0f ("serial: fsl_lpuart: Remove the alias node
dependence") the port line number can also be allocated by IDA, but in
case of an error the ID will no be removed again. More importantly, any
ID will be freed in remove(), even if it wasn't allocated but instead
fetched by of_alias_get_id(). If it was not allocated by IDA there will
be a warning:
WARN(1, "ida_free called for id=%d which is not allocated.\n", id);
Move the ID allocation more to the end of the probe() so that we still
can use plain return in the first error cases.
Fixes: 3bc3206e1c0f ("serial: fsl_lpuart: Remove the alias node dependence")
Signed-off-by: Michael Walle <michael@walle.cc>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200303174306.6015-3-michael@walle.cc
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
0 files changed, 0 insertions, 0 deletions