can: m_can: m_can_class_register(): remove error message in case devm_kzalloc() fails

If devm_kzalloc() fails, it already outputs an error message. Remove the
error message from m_can_class_register() accordingly.

Link: https://patch.msgid.link/20251008-m_can-cleanups-v1-5-1784a18eaa84@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
Marc Kleine-Budde 2025-08-07 17:19:31 +02:00
parent c6cbd24f65
commit 6218391758

View File

@ -2517,10 +2517,8 @@ int m_can_class_register(struct m_can_classdev *cdev)
devm_kzalloc(cdev->dev,
cdev->tx_fifo_size * sizeof(*cdev->tx_ops),
GFP_KERNEL);
if (!cdev->tx_ops) {
dev_err(cdev->dev, "Failed to allocate tx_ops for workqueue\n");
if (!cdev->tx_ops)
return -ENOMEM;
}
}
cdev->rst = devm_reset_control_get_optional_shared(cdev->dev, NULL);