From b56ce9f887a3a2f426a777731e371d794c6f9f0d Mon Sep 17 00:00:00 2001 From: njl Date: Sun, 9 Feb 2003 22:32:50 +0000 Subject: Clean up exit path from rl_attach() to remove multiple returns --- sys/pci/if_rl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/pci') diff --git a/sys/pci/if_rl.c b/sys/pci/if_rl.c index e1713bb..39cc6e8 100644 --- a/sys/pci/if_rl.c +++ b/sys/pci/if_rl.c @@ -1093,10 +1093,10 @@ rl_attach(dev) } callout_handle_init(&sc->rl_stat_ch); - return(0); fail: - mtx_destroy(&sc->rl_mtx); - return(error); + if (error != 0) + mtx_destroy(&sc->rl_mtx); + return (error); } static int -- cgit v1.1