Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab3b1c7e authored by Stephen Hemminger's avatar Stephen Hemminger Committed by Jeff Garzik
Browse files

chelsio: error path fix



Fix handling of allocation failure.

Signed-off-by: default avatarStephen Hemminger <shemminger@osdl.org>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 45d25301
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -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;