mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 17:13:52 +02:00
linux-can-fixes-for-5.16-20220109
-----BEGIN PGP SIGNATURE-----
iQFHBAABCgAxFiEEK3kIWJt9yTYMP3ehqclaivrt76kFAmHa1ooTHG1rbEBwZW5n
dXRyb25peC5kZQAKCRCpyVqK+u3vqX7nCACF0MLpkLANdtNRrGTnxMlfX5rVqX7q
exDeWJrBP1pMQVC4S8Tr6B+bWiq9z9GlXTNcP0xCJMgqGuy/2EOT4xWxeS2cV6fp
Q/ZyV2MJN/DV/wmP3Ak3K1DZzDZBiXBjqE2CLOu3xWI7IiiBC0iXeKNjfwYvYjvh
ZrJmqVwIKQ0zV3q+yeUepfTdwJi66QsaFVqvpojHQJxJI3TPgXTPds435zVpEfHi
pNwA/WWjv+dYp1E5qODXihtXFTHZocwOXDK62YZF3lYMfybjLsHbuIr5BPcP7VnC
ctpKNze/ObNo6rYV2pLj0/LJDu1cKegG1il7XDkvWujBKzDR4EgNttoR
=xYnc
-----END PGP SIGNATURE-----
Merge tag 'linux-can-fixes-for-5.16-20220109' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can
Marc Kleine-Budde says:
====================
pull-request: can 2022-01-09
The first patch is by Johan Hovold and fixes a mem leak in the error
path of the softing_cs driver.
The next patch is by me and fixes a set but not used variable warning
in the softing driver.
Jiasheng Jiang's patch for the xilinx_can driver adds the missing
error checking when getting the IRQ.
Lad Prabhakar contributes a patch for the rcar_canfd driver to fix a
mem leak in the error path.
The last patch is by Brian Silverman and properly initializes the send
USB messages to avoid spurious CAN error frames.
* tag 'linux-can-fixes-for-5.16-20220109' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can:
can: gs_usb: gs_can_start_xmit(): zero-initialize hf->{flags,reserved}
can: rcar_canfd: rcar_canfd_channel_probe(): make sure we free CAN network device
can: xilinx_can: xcan_probe(): check for error irq
can: softing: softing_startstop(): fix set but not used variable warning
can: softing_cs: softingcs_probe(): fix memleak on registration failure
====================
Link: https://lore.kernel.org/r/20220109134040.1945428-1-mkl@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
f4bb93a82f
|
|
@ -1640,8 +1640,7 @@ static int rcar_canfd_channel_probe(struct rcar_canfd_global *gpriv, u32 ch,
|
|||
ndev = alloc_candev(sizeof(*priv), RCANFD_FIFO_DEPTH);
|
||||
if (!ndev) {
|
||||
dev_err(&pdev->dev, "alloc_candev() failed\n");
|
||||
err = -ENOMEM;
|
||||
goto fail;
|
||||
return -ENOMEM;
|
||||
}
|
||||
priv = netdev_priv(ndev);
|
||||
|
||||
|
|
@ -1735,8 +1734,8 @@ static int rcar_canfd_channel_probe(struct rcar_canfd_global *gpriv, u32 ch,
|
|||
|
||||
fail_candev:
|
||||
netif_napi_del(&priv->napi);
|
||||
free_candev(ndev);
|
||||
fail:
|
||||
free_candev(ndev);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -293,7 +293,7 @@ static int softingcs_probe(struct pcmcia_device *pcmcia)
|
|||
return 0;
|
||||
|
||||
platform_failed:
|
||||
kfree(dev);
|
||||
platform_device_put(pdev);
|
||||
mem_failed:
|
||||
pcmcia_bad:
|
||||
pcmcia_failed:
|
||||
|
|
|
|||
|
|
@ -565,18 +565,19 @@ int softing_startstop(struct net_device *dev, int up)
|
|||
if (ret < 0)
|
||||
goto failed;
|
||||
}
|
||||
/* enable_error_frame */
|
||||
/*
|
||||
|
||||
/* enable_error_frame
|
||||
*
|
||||
* Error reporting is switched off at the moment since
|
||||
* the receiving of them is not yet 100% verified
|
||||
* This should be enabled sooner or later
|
||||
*
|
||||
if (error_reporting) {
|
||||
*/
|
||||
if (0 && error_reporting) {
|
||||
ret = softing_fct_cmd(card, 51, "enable_error_frame");
|
||||
if (ret < 0)
|
||||
goto failed;
|
||||
}
|
||||
*/
|
||||
|
||||
/* initialize interface */
|
||||
iowrite16(1, &card->dpram[DPRAM_FCT_PARAM + 2]);
|
||||
iowrite16(1, &card->dpram[DPRAM_FCT_PARAM + 4]);
|
||||
|
|
|
|||
|
|
@ -508,6 +508,8 @@ static netdev_tx_t gs_can_start_xmit(struct sk_buff *skb,
|
|||
|
||||
hf->echo_id = idx;
|
||||
hf->channel = dev->channel;
|
||||
hf->flags = 0;
|
||||
hf->reserved = 0;
|
||||
|
||||
cf = (struct can_frame *)skb->data;
|
||||
|
||||
|
|
|
|||
|
|
@ -1761,7 +1761,12 @@ static int xcan_probe(struct platform_device *pdev)
|
|||
spin_lock_init(&priv->tx_lock);
|
||||
|
||||
/* Get IRQ for the device */
|
||||
ndev->irq = platform_get_irq(pdev, 0);
|
||||
ret = platform_get_irq(pdev, 0);
|
||||
if (ret < 0)
|
||||
goto err_free;
|
||||
|
||||
ndev->irq = ret;
|
||||
|
||||
ndev->flags |= IFF_ECHO; /* We support local echo */
|
||||
|
||||
platform_set_drvdata(pdev, ndev);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user