Skip to content
Commit 0bbb8865 authored by Zhang Changzhong's avatar Zhang Changzhong Committed by Greg Kroah-Hartman
Browse files

can: m_can: pci: add missing m_can_class_free_dev() in probe/remove methods

[ Upstream commit 1eca1d4c ]

In m_can_pci_remove() and error handling path of m_can_pci_probe(),
m_can_class_free_dev() should be called to free resource allocated by
m_can_class_allocate_dev(), otherwise there will be memleak.

Fixes: cab7ffc0

 ("can: m_can: add PCI glue driver for Intel Elkhart Lake")
Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
Reviewed-by: default avatarJarkko Nikula <jarkko.nikula@linux.intel.com>
Link: https://lore.kernel.org/all/1668168684-6390-1-git-send-email-zhangchangzhong@huawei.com
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent d44fd8bd
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment