mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
Merge tag 'linux-can-fixes-for-6.15-20250415' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can
Marc Kleine-Budde says: ==================== pull-request: can 2025-04-15 The first patch is by Davide Caratti and fixes the missing derement in the protocol inuse counter for the J1939 CAN protocol. The last patch is by Weizhao Ouyang and fixes a broken quirks check in the rockchip CAN-FD driver. * tag 'linux-can-fixes-for-6.15-20250415' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: rockchip_canfd: fix broken quirks checks can: fix missing decrement of j1939_proto.inuse_idx ==================== Link: https://patch.msgid.link/20250415103401.445981-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -902,15 +902,16 @@ static int rkcanfd_probe(struct platform_device *pdev)
|
||||
priv->can.data_bittiming_const = &rkcanfd_data_bittiming_const;
|
||||
priv->can.ctrlmode_supported = CAN_CTRLMODE_LOOPBACK |
|
||||
CAN_CTRLMODE_BERR_REPORTING;
|
||||
if (!(priv->devtype_data.quirks & RKCANFD_QUIRK_CANFD_BROKEN))
|
||||
priv->can.ctrlmode_supported |= CAN_CTRLMODE_FD;
|
||||
priv->can.do_set_mode = rkcanfd_set_mode;
|
||||
priv->can.do_get_berr_counter = rkcanfd_get_berr_counter;
|
||||
priv->ndev = ndev;
|
||||
|
||||
match = device_get_match_data(&pdev->dev);
|
||||
if (match)
|
||||
if (match) {
|
||||
priv->devtype_data = *(struct rkcanfd_devtype_data *)match;
|
||||
if (!(priv->devtype_data.quirks & RKCANFD_QUIRK_CANFD_BROKEN))
|
||||
priv->can.ctrlmode_supported |= CAN_CTRLMODE_FD;
|
||||
}
|
||||
|
||||
err = can_rx_offload_add_manual(ndev, &priv->offload,
|
||||
RKCANFD_NAPI_WEIGHT);
|
||||
|
||||
@@ -655,6 +655,7 @@ static int j1939_sk_release(struct socket *sock)
|
||||
sock->sk = NULL;
|
||||
|
||||
release_sock(sk);
|
||||
sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1);
|
||||
sock_put(sk);
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user