Commit 8d1c37e6 authored by David S. Miller's avatar David S. Miller
Browse files

Merge tag 'linux-can-fixes-for-6.1-20221124' of...

Merge tag 'linux-can-fixes-for-6.1-20221124' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can



Marc Kleine-Budde says:

====================
linux-can-fixes-for-6.1-20221124

this is a pull request of 8 patches for net/master.

Ziyang Xuan contributes a patch for the can327, fixing a potential SKB
leak when the netdev is down.

Heiko Schocher's patch for the sja1000 driver fixes the width of the
definition of the OCR_MODE_MASK.

Zhang Changzhong contributes 4 patches. In the sja1000_isa, cc770, and
m_can_pci drivers the error path in the probe() function and in case
of the etas_es58x a function that is called by probe() are fixed.

Jiasheng Jiang add a missing check for the return value of the
devm_clk_get() in the m_can driver.

Yasushi SHOJI's patch for the mcba_usb fixes setting of the external
termination resistor.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 661e5ebb 1a8e3bd2
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -263,8 +263,10 @@ static void can327_feed_frame_to_netdev(struct can327 *elm, struct sk_buff *skb)
{
	lockdep_assert_held(&elm->lock);

	if (!netif_running(elm->dev))
	if (!netif_running(elm->dev)) {
		kfree_skb(skb);
		return;
	}

	/* Queue for NAPI pickup.
	 * rx-offload will update stats and LEDs for us.
+6 −4
Original line number Diff line number Diff line
@@ -264,13 +264,15 @@ static int cc770_isa_probe(struct platform_device *pdev)
	if (err) {
		dev_err(&pdev->dev,
			"couldn't register device (err=%d)\n", err);
		goto exit_unmap;
		goto exit_free;
	}

	dev_info(&pdev->dev, "device registered (reg_base=0x%p, irq=%d)\n",
		 priv->reg_base, dev->irq);
	return 0;

exit_free:
	free_cc770dev(dev);
exit_unmap:
	if (mem[idx])
		iounmap(base);
+1 −1
Original line number Diff line number Diff line
@@ -1909,7 +1909,7 @@ int m_can_class_get_clocks(struct m_can_classdev *cdev)
	cdev->hclk = devm_clk_get(cdev->dev, "hclk");
	cdev->cclk = devm_clk_get(cdev->dev, "cclk");

	if (IS_ERR(cdev->cclk)) {
	if (IS_ERR(cdev->hclk) || IS_ERR(cdev->cclk)) {
		dev_err(cdev->dev, "no clock found\n");
		ret = -ENODEV;
	}
+6 −3
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ static int m_can_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)

	ret = pci_alloc_irq_vectors(pci, 1, 1, PCI_IRQ_ALL_TYPES);
	if (ret < 0)
		return ret;
		goto err_free_dev;

	mcan_class->dev = &pci->dev;
	mcan_class->net->irq = pci_irq_vector(pci, 0);
@@ -132,7 +132,7 @@ static int m_can_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)

	ret = m_can_class_register(mcan_class);
	if (ret)
		goto err;
		goto err_free_irq;

	/* Enable interrupt control at CAN wrapper IP */
	writel(0x1, base + CTL_CSR_INT_CTL_OFFSET);
@@ -144,8 +144,10 @@ static int m_can_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)

	return 0;

err:
err_free_irq:
	pci_free_irq_vectors(pci);
err_free_dev:
	m_can_class_free_dev(mcan_class->net);
	return ret;
}

@@ -161,6 +163,7 @@ static void m_can_pci_remove(struct pci_dev *pci)
	writel(0x0, priv->base + CTL_CSR_INT_CTL_OFFSET);

	m_can_class_unregister(mcan_class);
	m_can_class_free_dev(mcan_class->net);
	pci_free_irq_vectors(pci);
}

+6 −4
Original line number Diff line number Diff line
@@ -202,13 +202,15 @@ static int sja1000_isa_probe(struct platform_device *pdev)
	if (err) {
		dev_err(&pdev->dev, "registering %s failed (err=%d)\n",
			DRV_NAME, err);
		goto exit_unmap;
		goto exit_free;
	}

	dev_info(&pdev->dev, "%s device registered (reg_base=0x%p, irq=%d)\n",
		 DRV_NAME, priv->reg_base, dev->irq);
	return 0;

exit_free:
	free_sja1000dev(dev);
exit_unmap:
	if (mem[idx])
		iounmap(base);
Loading