]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drivers/net: process the result of hdlc_open() and add call of hdlc_close() in uhdlc_...
authorAlexandra Diupina <adiupina@astralinux.ru>
Tue, 19 Sep 2023 14:25:02 +0000 (17:25 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Oct 2023 19:43:41 +0000 (21:43 +0200)
commitdf2ac887b8c6048e7a0d0075148ab3e3e4ddeff7
tree3cbb3a7883f17eb16ebd52710e2080444b93d425
parent71b1d2b57f145c8469aa9346f0fd57bf59b2b89c
drivers/net: process the result of hdlc_open() and add call of hdlc_close() in uhdlc_close()

[ Upstream commit a59addacf899b1b21a7b7449a1c52c98704c2472 ]

Process the result of hdlc_open() and call uhdlc_close()
in case of an error. It is necessary to pass the error
code up the control flow, similar to a possible
error in request_irq().
Also add a hdlc_close() call to the uhdlc_close()
because the comment to hdlc_close() says it must be called
by the hardware driver when the HDLC device is being closed

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: c19b6d246a35 ("drivers/net: support hdlc function for QE-UCC")
Signed-off-by: Alexandra Diupina <adiupina@astralinux.ru>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wan/fsl_ucc_hdlc.c