Skip to content

Commit f093615

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Fix several cases of missing of_node_put() calls in various networking drivers. From Peter Chen. 2) Don't try to remove unconfigured VLANs in qed driver, from Yuval Mintz. 3) Unbalanced locking in TIPC error handling, from Wei Yongjun. 4) Fix lockups in CPDMA driver, from Grygorii Strashko. 5) More MACSEC refcount et al fixes, from Sabrina Dubroca. 6) Fix MAC address setting in r8169 during runtime suspend, from Chun-Hao Lin. 7) Various printf format specifier fixes, from Heinrich Schuchardt. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (59 commits) qed: Fail driver load in 100g MSI mode. ethernet: ti: davinci_emac: add missing of_node_put after calling of_parse_phandle ethernet: stmicro: stmmac: add missing of_node_put after calling of_parse_phandle ethernet: stmicro: stmmac: dwmac-socfpga: add missing of_node_put after calling of_parse_phandle ethernet: renesas: sh_eth: add missing of_node_put after calling of_parse_phandle ethernet: renesas: ravb_main: add missing of_node_put after calling of_parse_phandle ethernet: marvell: pxa168_eth: add missing of_node_put after calling of_parse_phandle ethernet: marvell: mvpp2: add missing of_node_put after calling of_parse_phandle ethernet: marvell: mvneta: add missing of_node_put after calling of_parse_phandle ethernet: hisilicon: hns: hns_dsaf_main: add missing of_node_put after calling of_parse_phandle ethernet: hisilicon: hns: hns_dsaf_mac: add missing of_node_put after calling of_parse_phandle ethernet: cavium: octeon: add missing of_node_put after calling of_parse_phandle ethernet: aurora: nb8800: add missing of_node_put after calling of_parse_phandle ethernet: arc: emac_main: add missing of_node_put after calling of_parse_phandle ethernet: apm: xgene: add missing of_node_put after calling of_parse_phandle ethernet: altera: add missing of_node_put 8139too: fix system hang when there is a tx timeout event. qed: Fix error return code in qed_resc_alloc() net: qlcnic: avoid superfluous assignement dsa: b53: remove redundant if ...
2 parents d52bd54 + 1d2c202 commit f093615

52 files changed

Lines changed: 195 additions & 95 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎arch/arm/mach-omap2/omap_device.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ static int _omap_device_notifier_call(struct notifier_block *nb,
209209
int err;
210210

211211
switch (event) {
212-
case BUS_NOTIFY_DEL_DEVICE:
212+
case BUS_NOTIFY_REMOVED_DEVICE:
213213
if (pdev->archdata.od)
214214
omap_device_delete(pdev->archdata.od);
215215
break;

‎drivers/net/caif/caif_spi.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ static ssize_t print_frame(char *buf, size_t size, char *frm,
185185
/* Fast forward. */
186186
i = count - cut;
187187
len += snprintf((buf + len), (size - len),
188-
"--- %u bytes skipped ---\n",
189-
(int)(count - (cut * 2)));
188+
"--- %zu bytes skipped ---\n",
189+
count - (cut * 2));
190190
}
191191

192192
if ((!(i % 10)) && i) {

‎drivers/net/dsa/b53/b53_mmap.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,7 @@ static int b53_mmap_probe(struct platform_device *pdev)
233233
if (!dev)
234234
return -ENOMEM;
235235

236-
if (pdata)
237-
dev->pdata = pdata;
236+
dev->pdata = pdata;
238237

239238
platform_set_drvdata(pdev, dev);
240239

‎drivers/net/dsa/bcm_sf2.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1622,7 +1622,7 @@ static int bcm_sf2_sw_setup(struct dsa_switch *ds)
16221622
"switch_0", priv);
16231623
if (ret < 0) {
16241624
pr_err("failed to request switch_0 IRQ\n");
1625-
goto out_unmap;
1625+
goto out_mdio;
16261626
}
16271627

16281628
ret = request_irq(priv->irq1, bcm_sf2_switch_1_isr, 0,
@@ -1679,14 +1679,15 @@ static int bcm_sf2_sw_setup(struct dsa_switch *ds)
16791679

16801680
out_free_irq0:
16811681
free_irq(priv->irq0, priv);
1682+
out_mdio:
1683+
bcm_sf2_mdio_unregister(priv);
16821684
out_unmap:
16831685
base = &priv->core;
16841686
for (i = 0; i < BCM_SF2_REGS_NUM; i++) {
16851687
if (*base)
16861688
iounmap(*base);
16871689
base++;
16881690
}
1689-
bcm_sf2_mdio_unregister(priv);
16901691
return ret;
16911692
}
16921693

‎drivers/net/ethernet/8390/ax88796.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,8 @@ static int ax_probe(struct platform_device *pdev)
910910
iounmap(ax->map2);
911911

912912
exit_mem2:
913-
release_mem_region(mem2->start, mem2_size);
913+
if (mem2)
914+
release_mem_region(mem2->start, mem2_size);
914915

915916
exit_mem1:
916917
iounmap(ei_local->mem);

‎drivers/net/ethernet/altera/altera_tse_main.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,7 @@ static int init_phy(struct net_device *dev)
815815
phydev = of_phy_connect(dev, phynode,
816816
&altera_tse_adjust_link, 0, priv->phy_iface);
817817
}
818+
of_node_put(phynode);
818819

819820
if (!phydev) {
820821
netdev_err(dev, "Could not find the PHY\n");

‎drivers/net/ethernet/amd/xgbe/xgbe-drv.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ static int xgbe_alloc_channels(struct xgbe_prv_data *pdata)
154154
goto err_rx_ring;
155155

156156
for (i = 0, channel = channel_mem; i < count; i++, channel++) {
157-
snprintf(channel->name, sizeof(channel->name), "channel-%d", i);
157+
snprintf(channel->name, sizeof(channel->name), "channel-%u", i);
158158
channel->pdata = pdata;
159159
channel->queue_index = i;
160160
channel->dma_regs = pdata->xgmac_regs + DMA_CH_BASE +

‎drivers/net/ethernet/apm/xgene/xgene_enet_hw.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,7 @@ int xgene_enet_phy_connect(struct net_device *ndev)
772772

773773
phy_dev = of_phy_connect(ndev, np, &xgene_enet_adjust_link,
774774
0, pdata->phy_mode);
775+
of_node_put(np);
775776
if (!phy_dev) {
776777
netdev_err(ndev, "Could not connect to PHY\n");
777778
return -ENODEV;

‎drivers/net/ethernet/arc/emac_main.c‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -749,14 +749,16 @@ int arc_emac_probe(struct net_device *ndev, int interface)
749749
err = of_address_to_resource(dev->of_node, 0, &res_regs);
750750
if (err) {
751751
dev_err(dev, "failed to retrieve registers base from device tree\n");
752-
return -ENODEV;
752+
err = -ENODEV;
753+
goto out_put_node;
753754
}
754755

755756
/* Get IRQ from device tree */
756757
irq = irq_of_parse_and_map(dev->of_node, 0);
757758
if (!irq) {
758759
dev_err(dev, "failed to retrieve <irq> value from device tree\n");
759-
return -ENODEV;
760+
err = -ENODEV;
761+
goto out_put_node;
760762
}
761763

762764
ndev->netdev_ops = &arc_emac_netdev_ops;
@@ -778,7 +780,7 @@ int arc_emac_probe(struct net_device *ndev, int interface)
778780
err = clk_prepare_enable(priv->clk);
779781
if (err) {
780782
dev_err(dev, "failed to enable clock\n");
781-
return err;
783+
goto out_put_node;
782784
}
783785

784786
clock_frequency = clk_get_rate(priv->clk);
@@ -787,7 +789,8 @@ int arc_emac_probe(struct net_device *ndev, int interface)
787789
if (of_property_read_u32(dev->of_node, "clock-frequency",
788790
&clock_frequency)) {
789791
dev_err(dev, "failed to retrieve <clock-frequency> from device tree\n");
790-
return -EINVAL;
792+
err = -EINVAL;
793+
goto out_put_node;
791794
}
792795
}
793796

@@ -867,6 +870,7 @@ int arc_emac_probe(struct net_device *ndev, int interface)
867870
goto out_netif_api;
868871
}
869872

873+
of_node_put(phy_node);
870874
return 0;
871875

872876
out_netif_api:
@@ -877,6 +881,9 @@ int arc_emac_probe(struct net_device *ndev, int interface)
877881
out_clken:
878882
if (priv->clk)
879883
clk_disable_unprepare(priv->clk);
884+
out_put_node:
885+
of_node_put(phy_node);
886+
880887
return err;
881888
}
882889
EXPORT_SYMBOL_GPL(arc_emac_probe);

‎drivers/net/ethernet/aurora/nb8800.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,6 +1504,7 @@ static int nb8800_probe(struct platform_device *pdev)
15041504
err_free_dma:
15051505
nb8800_dma_free(dev);
15061506
err_free_bus:
1507+
of_node_put(priv->phy_node);
15071508
mdiobus_unregister(bus);
15081509
err_disable_clk:
15091510
clk_disable_unprepare(priv->clk);
@@ -1519,6 +1520,7 @@ static int nb8800_remove(struct platform_device *pdev)
15191520
struct nb8800_priv *priv = netdev_priv(ndev);
15201521

15211522
unregister_netdev(ndev);
1523+
of_node_put(priv->phy_node);
15221524

15231525
mdiobus_unregister(priv->mii_bus);
15241526

0 commit comments

Comments
 (0)