1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-27 21:18:26 +02:00

generic: ar8216: use dynamically allocated private data in ar8216_probe

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34242 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
juhosg 2012-11-18 12:26:34 +00:00
parent 1934b1e7e3
commit 42670d4d0f

View File

@ -1481,10 +1481,19 @@ ar8216_config_aneg(struct phy_device *phydev)
static int static int
ar8216_probe(struct phy_device *pdev) ar8216_probe(struct phy_device *pdev)
{ {
struct ar8216_priv priv; struct ar8216_priv *priv;
int ret;
priv.phy = pdev; priv = kzalloc(sizeof(struct ar8216_priv), GFP_KERNEL);
return ar8216_id_chip(&priv); if (priv == NULL)
return -ENOMEM;
priv->phy = pdev;
ret = ar8216_id_chip(priv);
kfree(priv);
return ret;
} }
static void static void