aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2014-02-05 06:56:43 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-07 14:10:08 -0500
commitad3815a595fd7a5c5e4a24947a56eec29582a505 (patch)
tree256aa821794f80052491eb04a0753a9283fea843 /drivers/staging
parente6ff3f4e6d258021fe041d7acf5d013c26bf387b (diff)
xlr_net: Fix missing trivial allocation check
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/netlogic/xlr_net.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c
index eedffed17e39..d8ea25486a33 100644
--- a/drivers/staging/netlogic/xlr_net.c
+++ b/drivers/staging/netlogic/xlr_net.c
@@ -892,6 +892,11 @@ static int xlr_setup_mdio(struct xlr_net_priv *priv,
892 priv->mii_bus->write = xlr_mii_write; 892 priv->mii_bus->write = xlr_mii_write;
893 priv->mii_bus->parent = &pdev->dev; 893 priv->mii_bus->parent = &pdev->dev;
894 priv->mii_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL); 894 priv->mii_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL);
895 if (priv->mii_bus->irq == NULL) {
896 pr_err("irq alloc failed\n");
897 mdiobus_free(priv->mii_bus);
898 return -ENOMEM;
899 }
895 priv->mii_bus->irq[priv->phy_addr] = priv->ndev->irq; 900 priv->mii_bus->irq[priv->phy_addr] = priv->ndev->irq;
896 901
897 /* Scan only the enabled address */ 902 /* Scan only the enabled address */