]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
can: ti_hecc: Fix memleak in ti_hecc_probe
authorZhang Qilong <zhangqilong3@huawei.com>
Sat, 14 Nov 2020 11:17:08 +0000 (19:17 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Nov 2020 12:27:22 +0000 (13:27 +0100)
commit80b9f0191a3b458f7cc3c4ed72011963920b59d6
treef71d4c07c6a01751a56a7b4cc7dd59acc88952b5
parentcef79b5249ea3bf7889f222999a3bcbc560d9a41
can: ti_hecc: Fix memleak in ti_hecc_probe

[ Upstream commit 7968c7c79d3be8987feb8021f0c46e6866831408 ]

In the error handling, we should goto the probe_exit_candev
to free ndev to prevent memory leak.

Fixes: dabf54dd1c63 ("can: ti_hecc: Convert TI HECC driver to DT only driver")
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Link: https://lore.kernel.org/r/20201114111708.3465543-1-zhangqilong3@huawei.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/can/ti_hecc.c