mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-20 12:56:07 +07:00
can: m_can_platform: m_can_plat_probe(): add missing error handling if mcan_class is NULL
This patch adds the missing error handling in m_can_plat_probe() if
mcan_class is NULL.
Fixes: f524f829b7
("can: m_can: Create a m_can platform framework")
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
parent
28b0ffe98b
commit
b3402c4057
@ -63,6 +63,9 @@ static int m_can_plat_probe(struct platform_device *pdev)
|
||||
int irq, ret = 0;
|
||||
|
||||
mcan_class = m_can_class_allocate_dev(&pdev->dev);
|
||||
if (!mcan_class)
|
||||
return -ENOMEM;
|
||||
|
||||
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
|
||||
if (!priv)
|
||||
return -ENOMEM;
|
||||
|
Loading…
Reference in New Issue
Block a user