Commit 8e248f2d authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge tag 'linux-can-fixes-for-6.14-20250208' of...

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

Marc Kleine-Budde says:

====================
pull-request: can 2025-02-08

The first patch is by Reyders Morales and fixes a code example in the
CAN ISO15765-2 documentation.

The next patch is contributed by Alexander Hölzl and fixes sending of
J1939 messages with zero data length.

Fedor Pchelkin's patch for the ctucanfd driver adds a missing handling
for an skb allocation error.

Krzysztof Kozlowski contributes a patch for the c_can driver to fix
unbalanced runtime PM disable in error path.

The next patch is by Vincent Mailhol and fixes a NULL pointer
dereference on udev->serial in the etas_es58x driver.

The patch is by Robin van der Gracht and fixes the handling for an skb
allocation error.

* tag 'linux-can-fixes-for-6.14-20250208' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can:
  can: rockchip: rkcanfd_handle_rx_fifo_overflow_int(): bail out if skb cannot be allocated
  can: etas_es58x: fix potential NULL pointer dereference on udev->serial
  can: c_can: fix unbalanced runtime PM disable in error path
  can: ctucanfd: handle skb allocation failure
  can: j1939: j1939_sk_send_loop(): fix unable to send messages with data length zero
  Documentation/networking: fix basic node example document ISO 15765-2
====================

Link: https://patch.msgid.link/20250208115120.237274-1-mkl@pengutronix.de


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 17847ea6 f7f0adfe
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -369,8 +369,8 @@ to their default.

  addr.can_family = AF_CAN;
  addr.can_ifindex = if_nametoindex("can0");
  addr.tp.tx_id = 0x18DA42F1 | CAN_EFF_FLAG;
  addr.tp.rx_id = 0x18DAF142 | CAN_EFF_FLAG;
  addr.can_addr.tp.tx_id = 0x18DA42F1 | CAN_EFF_FLAG;
  addr.can_addr.tp.rx_id = 0x18DAF142 | CAN_EFF_FLAG;

  ret = bind(s, (struct sockaddr *)&addr, sizeof(addr));
  if (ret < 0)
+3 −2
Original line number Diff line number Diff line
@@ -385,15 +385,16 @@ static int c_can_plat_probe(struct platform_device *pdev)
	if (ret) {
		dev_err(&pdev->dev, "registering %s failed (err=%d)\n",
			KBUILD_MODNAME, ret);
		goto exit_free_device;
		goto exit_pm_runtime;
	}

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

exit_free_device:
exit_pm_runtime:
	pm_runtime_disable(priv->device);
exit_free_device:
	free_c_can_dev(dev);
exit:
	dev_err(&pdev->dev, "probe failed\n");
+6 −4
Original line number Diff line number Diff line
@@ -867,10 +867,12 @@ static void ctucan_err_interrupt(struct net_device *ndev, u32 isr)
			}
			break;
		case CAN_STATE_ERROR_ACTIVE:
			if (skb) {
				cf->can_id |= CAN_ERR_CNT;
				cf->data[1] = CAN_ERR_CRTL_ACTIVE;
				cf->data[6] = bec.txerr;
				cf->data[7] = bec.rxerr;
			}
			break;
		default:
			netdev_warn(ndev, "unhandled error state (%d:%s)!\n",
+1 −1
Original line number Diff line number Diff line
@@ -622,7 +622,7 @@ rkcanfd_handle_rx_fifo_overflow_int(struct rkcanfd_priv *priv)
	netdev_dbg(priv->ndev, "RX-FIFO overflow\n");

	skb = rkcanfd_alloc_can_err_skb(priv, &cf, &timestamp);
	if (skb)
	if (!skb)
		return 0;

	rkcanfd_get_berr_counter_corrected(priv, &bec);
+5 −1
Original line number Diff line number Diff line
@@ -248,7 +248,11 @@ static int es58x_devlink_info_get(struct devlink *devlink,
			return ret;
	}

	return devlink_info_serial_number_put(req, es58x_dev->udev->serial);
	if (es58x_dev->udev->serial)
		ret = devlink_info_serial_number_put(req,
						     es58x_dev->udev->serial);

	return ret;
}

const struct devlink_ops es58x_dl_ops = {
Loading