aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2007-02-10 23:57:57 +0100
committerStefan Richter <stefanr@s5r6.in-berlin.de>2007-04-30 00:00:30 +0200
commit2cd556ae61c862f4d00bb63863c6e5c67fd55bd4 (patch)
treea20848309b3f04d06b6ddbeae59fe13ddfed29e3
parent157188cb54b22e5c0c6439ef0500ba97b068097a (diff)
downloadkernel_samsung_smdk4412-2cd556ae61c862f4d00bb63863c6e5c67fd55bd4.zip
kernel_samsung_smdk4412-2cd556ae61c862f4d00bb63863c6e5c67fd55bd4.tar.gz
kernel_samsung_smdk4412-2cd556ae61c862f4d00bb63863c6e5c67fd55bd4.tar.bz2
ieee1394: eth1394: clean up host removal
ether1394_add_host() guarantees that hi->dev != NULL if hi != NULL. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
-rw-r--r--drivers/ieee1394/eth1394.c27
1 files changed, 10 insertions, 17 deletions
diff --git a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c
index e2b84c9..63fca14 100644
--- a/drivers/ieee1394/eth1394.c
+++ b/drivers/ieee1394/eth1394.c
@@ -655,24 +655,17 @@ out:
static void ether1394_remove_host (struct hpsb_host *host)
{
struct eth1394_host_info *hi;
+ struct eth1394_priv *priv;
hi = hpsb_get_hostinfo(&eth1394_highlevel, host);
- if (hi != NULL) {
- struct eth1394_priv *priv = netdev_priv(hi->dev);
-
- hpsb_unregister_addrspace(&eth1394_highlevel, host,
- priv->local_fifo);
-
- if (priv->iso != NULL)
- hpsb_iso_shutdown(priv->iso);
-
- if (hi->dev) {
- unregister_netdev (hi->dev);
- free_netdev(hi->dev);
- }
- }
-
- return;
+ if (!hi)
+ return;
+ priv = netdev_priv(hi->dev);
+ hpsb_unregister_addrspace(&eth1394_highlevel, host, priv->local_fifo);
+ if (priv->iso)
+ hpsb_iso_shutdown(priv->iso);
+ unregister_netdev(hi->dev);
+ free_netdev(hi->dev);
}
/* A reset has just arisen */
@@ -689,7 +682,7 @@ static void ether1394_host_reset (struct hpsb_host *host)
hi = hpsb_get_hostinfo(&eth1394_highlevel, host);
/* This can happen for hosts that we don't use */
- if (hi == NULL)
+ if (!hi)
return;
dev = hi->dev;