diff options
-rw-r--r-- | drivers/net/chelsio/my3126.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/chelsio/my3126.c b/drivers/net/chelsio/my3126.c index c7731b6f9de3..82fed1dd5005 100644 --- a/drivers/net/chelsio/my3126.c +++ b/drivers/net/chelsio/my3126.c | |||
@@ -170,9 +170,10 @@ static struct cphy *my3126_phy_create(adapter_t *adapter, | |||
170 | { | 170 | { |
171 | struct cphy *cphy = kzalloc(sizeof (*cphy), GFP_KERNEL); | 171 | struct cphy *cphy = kzalloc(sizeof (*cphy), GFP_KERNEL); |
172 | 172 | ||
173 | if (cphy) | 173 | if (!cphy) |
174 | cphy_init(cphy, adapter, phy_addr, &my3126_ops, mdio_ops); | 174 | return NULL; |
175 | 175 | ||
176 | cphy_init(cphy, adapter, phy_addr, &my3126_ops, mdio_ops); | ||
176 | INIT_DELAYED_WORK(&cphy->phy_update, my3216_poll); | 177 | INIT_DELAYED_WORK(&cphy->phy_update, my3216_poll); |
177 | cphy->bmsr = 0; | 178 | cphy->bmsr = 0; |
178 | 179 | ||