Code Review
/
kvmfornfv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
These changes are a raw update to a vanilla kernel 4.1.10, with the
[kvmfornfv.git]
/
kernel
/
drivers
/
net
/
ethernet
/
stmicro
/
stmmac
/
stmmac_main.c
diff --git
a/kernel/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
b/kernel/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index
2c5ce2b
..
c274cdc
100644
(file)
--- a/
kernel/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/
kernel/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@
-829,8
+829,11
@@
static int stmmac_init_phy(struct net_device *dev)
phydev = phy_connect(dev, phy_id_fmt, &stmmac_adjust_link, interface);
phydev = phy_connect(dev, phy_id_fmt, &stmmac_adjust_link, interface);
- if (IS_ERR(phydev)) {
+ if (IS_ERR
_OR_NULL
(phydev)) {
pr_err("%s: Could not attach to PHY\n", dev->name);
pr_err("%s: Could not attach to PHY\n", dev->name);
+ if (!phydev)
+ return -ENODEV;
+
return PTR_ERR(phydev);
}
return PTR_ERR(phydev);
}
@@
-1189,41
+1192,41
@@
static int alloc_dma_desc_resources(struct stmmac_priv *priv)
goto err_tx_skbuff;
if (priv->extend_desc) {
goto err_tx_skbuff;
if (priv->extend_desc) {
- priv->dma_erx = dma_alloc_coherent(priv->device, rxsize *
- sizeof(struct
- dma_extended_desc),
- &priv->dma_rx_phy,
- GFP_KERNEL);
+ priv->dma_erx = dma_
z
alloc_coherent(priv->device, rxsize *
+
sizeof(struct
+
dma_extended_desc),
+
&priv->dma_rx_phy,
+
GFP_KERNEL);
if (!priv->dma_erx)
goto err_dma;
if (!priv->dma_erx)
goto err_dma;
- priv->dma_etx = dma_alloc_coherent(priv->device, txsize *
- sizeof(struct
- dma_extended_desc),
- &priv->dma_tx_phy,
- GFP_KERNEL);
+ priv->dma_etx = dma_
z
alloc_coherent(priv->device, txsize *
+
sizeof(struct
+
dma_extended_desc),
+
&priv->dma_tx_phy,
+
GFP_KERNEL);
if (!priv->dma_etx) {
dma_free_coherent(priv->device, priv->dma_rx_size *
if (!priv->dma_etx) {
dma_free_coherent(priv->device, priv->dma_rx_size *
- sizeof(struct dma_extended_desc),
- priv->dma_erx, priv->dma_rx_phy);
+
sizeof(struct dma_extended_desc),
+
priv->dma_erx, priv->dma_rx_phy);
goto err_dma;
}
} else {
goto err_dma;
}
} else {
- priv->dma_rx = dma_alloc_coherent(priv->device, rxsize *
- sizeof(struct dma_desc),
- &priv->dma_rx_phy,
- GFP_KERNEL);
+ priv->dma_rx = dma_
z
alloc_coherent(priv->device, rxsize *
+
sizeof(struct dma_desc),
+
&priv->dma_rx_phy,
+
GFP_KERNEL);
if (!priv->dma_rx)
goto err_dma;
if (!priv->dma_rx)
goto err_dma;
- priv->dma_tx = dma_alloc_coherent(priv->device, txsize *
- sizeof(struct dma_desc),
- &priv->dma_tx_phy,
- GFP_KERNEL);
+ priv->dma_tx = dma_
z
alloc_coherent(priv->device, txsize *
+
sizeof(struct dma_desc),
+
&priv->dma_tx_phy,
+
GFP_KERNEL);
if (!priv->dma_tx) {
dma_free_coherent(priv->device, priv->dma_rx_size *
if (!priv->dma_tx) {
dma_free_coherent(priv->device, priv->dma_rx_size *
- sizeof(struct dma_desc),
- priv->dma_rx, priv->dma_rx_phy);
+
sizeof(struct dma_desc),
+
priv->dma_rx, priv->dma_rx_phy);
goto err_dma;
}
}
goto err_dma;
}
}