Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=157188cb54b22e5c0c6439ef0500ba97b068097a Commit: 157188cb54b22e5c0c6439ef0500ba97b068097a Parent: ea9057ad622db41745be416e29c5760d141a6514 Author: Stefan Richter <[EMAIL PROTECTED]> AuthorDate: Sat Feb 10 23:56:38 2007 +0100 Committer: Stefan Richter <[EMAIL PROTECTED]> CommitDate: Mon Apr 30 00:00:30 2007 +0200
ieee1394: eth1394: unregister address space in failure case Warn if hpsb_allocate_and_register_addrspace() failed. Unregister the address space if something else failed. Signed-off-by: Stefan Richter <[EMAIL PROTECTED]> --- drivers/ieee1394/eth1394.c | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c index a364003..e2b84c9 100644 --- a/drivers/ieee1394/eth1394.c +++ b/drivers/ieee1394/eth1394.c @@ -568,8 +568,10 @@ static void ether1394_add_host (struct hpsb_host *host) ð1394_highlevel, host, &addr_ops, ETHER1394_REGION_ADDR_LEN, ETHER1394_REGION_ADDR_LEN, CSR1212_INVALID_ADDR_SPACE, CSR1212_INVALID_ADDR_SPACE); - if (fifo_addr == CSR1212_INVALID_ADDR_SPACE) - goto out; + if (fifo_addr == CSR1212_INVALID_ADDR_SPACE) { + ETH1394_PRINT_G(KERN_ERR, "Cannot register CSR space\n"); + return; + } /* We should really have our own alloc_hpsbdev() function in * net_init.c instead of calling the one for ethernet then hijacking @@ -640,16 +642,13 @@ static void ether1394_add_host (struct hpsb_host *host) else priv->bc_state = ETHER1394_BC_RUNNING; } - return; - out: - if (dev != NULL) + if (dev) free_netdev(dev); if (hi) hpsb_destroy_hostinfo(ð1394_highlevel, host); - - return; + hpsb_unregister_addrspace(ð1394_highlevel, host, fifo_addr); } /* Remove a card from our list */ - 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