Changeset 34356


Ignore:
Timestamp:
2012-11-25T17:22:41+01:00 (5 years ago)
Author:
juhosg
Message:

AA: generic: ar8216: use dynamically allocated private data in ar8216_probe

Backport of r34242.

Signed-off-by: Gabor Juhos <juhosg@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/attitude_adjustment/target/linux/generic/files/drivers/net/phy/ar8216.c

    r32604 r34356  
    14821482ar8216_probe(struct phy_device *pdev) 
    14831483{ 
    1484         struct ar8216_priv priv; 
    1485  
    1486         priv.phy = pdev; 
    1487         return ar8216_id_chip(&priv); 
     1484        struct ar8216_priv *priv; 
     1485        int ret; 
     1486 
     1487        priv = kzalloc(sizeof(struct ar8216_priv), GFP_KERNEL); 
     1488        if (priv == NULL) 
     1489                return -ENOMEM; 
     1490 
     1491        priv->phy = pdev; 
     1492 
     1493        ret = ar8216_id_chip(priv); 
     1494        kfree(priv); 
     1495 
     1496        return ret; 
    14881497} 
    14891498 
Note: See TracChangeset for help on using the changeset viewer.