Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46957
b: refs/heads/master
c: 719647e
h: refs/heads/master
i:
  46955: 4b44002
v: v3
  • Loading branch information
Akinobu Mita authored and David S. Miller committed Feb 8, 2007
1 parent 5d13eec commit 8ab6630
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bb5aa42734e72b3f02fc0b3cdd6105083f9880f1
refs/heads/master: 719647e2131585ea0a82b05d3745b36be32975d8
23 changes: 20 additions & 3 deletions trunk/net/irda/irlan/irlan_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,18 @@ static int __init irlan_init(void)
/* Register with IrLMP as a client */
ckey = irlmp_register_client(hints, &irlan_client_discovery_indication,
NULL, NULL);

if (!ckey)
goto err_ckey;

/* Register with IrLMP as a service */
skey = irlmp_register_service(hints);
skey = irlmp_register_service(hints);
if (!skey)
goto err_skey;

/* Start the master IrLAN instance (the only one for now) */
new = irlan_open(DEV_ADDR_ANY, DEV_ADDR_ANY);
new = irlan_open(DEV_ADDR_ANY, DEV_ADDR_ANY);
if (!new)
goto err_open;

/* The master will only open its (listen) control TSAP */
irlan_provider_open_ctrl_tsap(new);
Expand All @@ -158,6 +164,17 @@ static int __init irlan_init(void)
irlmp_discovery_request(DISCOVERY_DEFAULT_SLOTS);

return 0;

err_open:
irlmp_unregister_service(skey);
err_skey:
irlmp_unregister_client(ckey);
err_ckey:
#ifdef CONFIG_PROC_FS
remove_proc_entry("irlan", proc_irda);
#endif /* CONFIG_PROC_FS */

return -ENOMEM;
}

static void __exit irlan_cleanup(void)
Expand Down

0 comments on commit 8ab6630

Please sign in to comment.