]> git.baikalelectronics.ru Git - kernel.git/commit
net: wan: Add checks for NULL for utdm in undo_uhdlc_init and unmap_si_regs
authorEsina Ekaterina <eesina@astralinux.ru>
Thu, 12 Jan 2023 07:47:03 +0000 (10:47 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Feb 2023 06:52:37 +0000 (07:52 +0100)
commitbcf13e09a92c3618f98321709eba6aee04b4aa3c
treede99e7e55f55201b2fcfd9e1d9b35af3f0dca147
parentd7247ebc5b2b2f46749f61d647d476dd31c273c4
net: wan: Add checks for NULL for utdm in undo_uhdlc_init and unmap_si_regs

[ Upstream commit 488e0bf7f34af3d42d1d5e56f7a5a7beaff188a3 ]

If uhdlc_priv_tsa != 1 then utdm is not initialized.
And if ret != NULL then goto undo_uhdlc_init, where
utdm is dereferenced. Same if dev == NULL.

Found by Astra Linux on behalf of Linux Verification Center
(linuxtesting.org) with SVACE.

Fixes: 592fe8ad535b ("soc/fsl/qe: fix err handling of ucc_of_parse_tdm")
Signed-off-by: Esina Ekaterina <eesina@astralinux.ru>
Link: https://lore.kernel.org/r/20230112074703.13558-1-eesina@astralinux.ru
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wan/fsl_ucc_hdlc.c