linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jiri Slaby" <xslaby@fi.muni.cz>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
	calin@ajvar.org, linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: Re: PATCH: SBC EPX does not check/claim I/O ports it uses (2nd Edition)
Date: Wed, 18 Jan 2006 13:10:46 +0100	[thread overview]
Message-ID: <20060118121046.15C3122B38B@anxur.fi.muni.cz> (raw)
In-Reply-To: <1137523345.14135.85.camel@localhost.localdomain>

Alan Cox wrote:
>Signed-off-by: Alan Cox <alan@redhat.com>
>
>--- linux.vanilla-2.6.16-rc1/drivers/char/watchdog/sbc_epx_c3.c	2006-01-17 15:52:53.000000000 +0000
>+++ linux-2.6.16-rc1/drivers/char/watchdog/sbc_epx_c3.c	2006-01-17 18:27:39.149607944 +0000
>@@ -25,6 +25,7 @@
> #include <linux/notifier.h>
> #include <linux/reboot.h>
> #include <linux/init.h>
>+#include <linux/ioport.h>
> #include <asm/uaccess.h>
> #include <asm/io.h>
> 
>@@ -180,12 +181,15 @@
> static int __init watchdog_init(void)
> {
> 	int ret;
>+	
>+	if (!request_region(EPXC3_WATCHDOG_CTL_REG, 2, "epxc3_watchdog"))
>+		return -EBUSY;
> 
> 	ret = register_reboot_notifier(&epx_c3_notifier);
> 	if (ret) {
> 		printk(KERN_ERR PFX "cannot register reboot notifier "
> 			"(err=%d)\n", ret);
>-		return ret;
>+		goto out;
> 	}
> 
> 	ret = misc_register(&epx_c3_miscdev);
>@@ -193,12 +197,16 @@
> 		printk(KERN_ERR PFX "cannot register miscdev on minor=%d "
> 			"(err=%d)\n", WATCHDOG_MINOR, ret);
> 		unregister_reboot_notifier(&epx_c3_notifier);
>-		return ret;
>+		goto out;
> 	}
> 
> 	printk(banner);
> 
> 	return 0;
>+
>+out:
>+	release_region(EPXC3_WATCHDOG_CTL_REG, 2);
>+	return ret;
> }
> 
> static void __exit watchdog_exit(void)
But now, you forgot to add release_region in this (exit) function :)?

regards,
-- 
Jiri Slaby         www.fi.muni.cz/~xslaby
\_.-^-._   jirislaby@gmail.com   _.-^-._/
B67499670407CE62ACC8 22A032CC55C339D47A7E

  reply	other threads:[~2006-01-18 12:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-17 17:52 PATCH: SBC EPX does not check/claim I/O ports it uses Alan Cox
2006-01-17 18:03 ` Bartlomiej Zolnierkiewicz
2006-01-17 18:09   ` Alan Cox
2006-01-17 18:42   ` PATCH: SBC EPX does not check/claim I/O ports it uses (2nd Edition) Alan Cox
2006-01-18 12:10     ` Jiri Slaby [this message]
2006-01-18 12:20       ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060118121046.15C3122B38B@anxur.fi.muni.cz \
    --to=xslaby@fi.muni.cz \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=bzolnier@gmail.com \
    --cc=calin@ajvar.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).