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

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

[PATCH] chelsio: use kzalloc



Use kzalloc in several places.

Signed-off-by: default avatarStephen Hemminger <shemminger@osdl.org>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 11e5a202
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -205,11 +205,11 @@ static struct cphy *mv88x201x_phy_create(adapter_t *adapter, int phy_addr,
					 struct mdio_ops *mdio_ops)
{
	u32 val;
	struct cphy *cphy = kmalloc(sizeof(*cphy), GFP_KERNEL);
	struct cphy *cphy = kzalloc(sizeof(*cphy), GFP_KERNEL);

	if (!cphy)
		return NULL;
	memset(cphy, 0, sizeof(*cphy));

	cphy_init(cphy, adapter, phy_addr, &mv88x201x_ops, mdio_ops);

	/* Commands the PHY to enable XFP's clock. */
+1 −2
Original line number Diff line number Diff line
@@ -631,10 +631,9 @@ static struct cmac *pm3393_mac_create(adapter_t *adapter, int index)
{
	struct cmac *cmac;

	cmac = kmalloc(sizeof(*cmac) + sizeof(cmac_instance), GFP_KERNEL);
	cmac = kzalloc(sizeof(*cmac) + sizeof(cmac_instance), GFP_KERNEL);
	if (!cmac)
		return NULL;
	memset(cmac, 0, sizeof(*cmac));

	cmac->ops = &pm3393_ops;
	cmac->instance = (cmac_instance *) (cmac + 1);