https://github.com/torvalds/linux
Revision 2b2e71fe657510a6f71aa16ef0309fa6bc20ab3d authored by Michael Walle on 03 March 2020, 17:42:59 UTC, committed by Greg Kroah-Hartman on 06 March 2020, 13:10:44 UTC
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>
1 parent 0e28ed6
History
Tip revision: 2b2e71fe657510a6f71aa16ef0309fa6bc20ab3d authored by Michael Walle on 03 March 2020, 17:42:59 UTC
tty: serial: fsl_lpuart: free IDs allocated by IDA
Tip revision: 2b2e71f
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 15.0 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 71 bytes
.gitattributes -rw-r--r-- 62 bytes
.gitignore -rw-r--r-- 1.7 KB
.mailmap -rw-r--r-- 14.8 KB
COPYING -rw-r--r-- 496 bytes
CREDITS -rw-r--r-- 97.3 KB
Kbuild -rw-r--r-- 1.3 KB
Kconfig -rw-r--r-- 595 bytes
MAINTAINERS -rw-r--r-- 533.0 KB
Makefile -rw-r--r-- 58.9 KB
README -rw-r--r-- 727 bytes

README

back to top