mirror of
https://github.com/torvalds/linux.git
synced 2024-09-28 02:43:02 +00:00
chelsio: error path fix
Fix handling of allocation failure. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
parent
45d2530167
commit
ab3b1c7e82
|
@ -170,9 +170,10 @@ static struct cphy *my3126_phy_create(adapter_t *adapter,
|
||||||
{
|
{
|
||||||
struct cphy *cphy = kzalloc(sizeof (*cphy), GFP_KERNEL);
|
struct cphy *cphy = kzalloc(sizeof (*cphy), GFP_KERNEL);
|
||||||
|
|
||||||
if (cphy)
|
if (!cphy)
|
||||||
cphy_init(cphy, adapter, phy_addr, &my3126_ops, mdio_ops);
|
return NULL;
|
||||||
|
|
||||||
|
cphy_init(cphy, adapter, phy_addr, &my3126_ops, mdio_ops);
|
||||||
INIT_DELAYED_WORK(&cphy->phy_update, my3216_poll);
|
INIT_DELAYED_WORK(&cphy->phy_update, my3216_poll);
|
||||||
cphy->bmsr = 0;
|
cphy->bmsr = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user