linux-can-fixes-for-4.10-20170118

-----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCgAxFiEES2FAuYbJvAGobdVQPTuqJaypJWoFAlh/WgYTHG1rbEBwZW5n
 dXRyb25peC5kZQAKCRA9O6olrKklam7fCACXaDVUaZdXmdFMjANz1Tp0Gys9VBUQ
 3bHaGDTXqoYNe+VnpXk++djj5GBfAH8N1F5LMdJ4nWaeed4D1ZTrB5zA2jtcsONS
 dAm/AyiXWd6QHnvW5c7VoT2renE4SvXU41+I7EQYWxXwKkm4ilg4YSssqOfAQkRS
 vv3X05j5q5RrZ881pJY1DfPlCUCSeHaO9xgtHQXBxARsQAUQ+4/I1yTVDFiEtn+G
 UP079C1v/3Y84YAsZ1Hj/IHtkqeAWdZGMkvI9mgIJiJ5yDHtIJNsCxW8l5r/G8vD
 0TtsE7C6TJgkH+YeR4i8yNa+q4wVaoPLNdUyGPXpJAu84FcZBw9OT6lE
 =NyIG
 -----END PGP SIGNATURE-----

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

Marc Kleine-Budde says:

====================
pull-request: can 2017-01-18

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

In the first patch Einar Jón fixes a NULL-pointer-deref in the c_can_pci
driver. In the second patch Yegor Yefremov fixes the clock handling in the
ti_hecc driver.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller 2017-01-18 11:36:41 -05:00
Родитель 93b43fd137 befa60113c
Коммит 003ecadd2e
2 изменённых файлов: 13 добавлений и 4 удалений

Просмотреть файл

@ -161,6 +161,7 @@ static int c_can_pci_probe(struct pci_dev *pdev,
dev->irq = pdev->irq;
priv->base = addr;
priv->device = &pdev->dev;
if (!c_can_pci_data->freq) {
dev_err(&pdev->dev, "no clock frequency defined\n");

Просмотреть файл

@ -948,7 +948,12 @@ static int ti_hecc_probe(struct platform_device *pdev)
netif_napi_add(ndev, &priv->napi, ti_hecc_rx_poll,
HECC_DEF_NAPI_WEIGHT);
clk_enable(priv->clk);
err = clk_prepare_enable(priv->clk);
if (err) {
dev_err(&pdev->dev, "clk_prepare_enable() failed\n");
goto probe_exit_clk;
}
err = register_candev(ndev);
if (err) {
dev_err(&pdev->dev, "register_candev() failed\n");
@ -981,7 +986,7 @@ static int ti_hecc_remove(struct platform_device *pdev)
struct ti_hecc_priv *priv = netdev_priv(ndev);
unregister_candev(ndev);
clk_disable(priv->clk);
clk_disable_unprepare(priv->clk);
clk_put(priv->clk);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
iounmap(priv->base);
@ -1006,7 +1011,7 @@ static int ti_hecc_suspend(struct platform_device *pdev, pm_message_t state)
hecc_set_bit(priv, HECC_CANMC, HECC_CANMC_PDR);
priv->can.state = CAN_STATE_SLEEPING;
clk_disable(priv->clk);
clk_disable_unprepare(priv->clk);
return 0;
}
@ -1015,8 +1020,11 @@ static int ti_hecc_resume(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
struct ti_hecc_priv *priv = netdev_priv(dev);
int err;
clk_enable(priv->clk);
err = clk_prepare_enable(priv->clk);
if (err)
return err;
hecc_clear_bit(priv, HECC_CANMC, HECC_CANMC_PDR);
priv->can.state = CAN_STATE_ERROR_ACTIVE;