Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ab3b1c7e82fe6094a07baa5d2cb0138c4cb40fcb Commit: ab3b1c7e82fe6094a07baa5d2cb0138c4cb40fcb Parent: 45d2530167027e96686a1b6a7892c55af1f516f5 Author: Stephen Hemminger <[EMAIL PROTECTED]> AuthorDate: Mon Jan 8 11:24:26 2007 -0800 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Tue Jan 9 02:24:37 2007 -0500
chelsio: error path fix Fix handling of allocation failure. Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- 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 c7731b6..82fed1d 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, { struct cphy *cphy = kzalloc(sizeof (*cphy), GFP_KERNEL); - if (cphy) - cphy_init(cphy, adapter, phy_addr, &my3126_ops, mdio_ops); + if (!cphy) + return NULL; + cphy_init(cphy, adapter, phy_addr, &my3126_ops, mdio_ops); INIT_DELAYED_WORK(&cphy->phy_update, my3216_poll); cphy->bmsr = 0; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html