From: Arjan van de Ven <arjan@infradead.org>
To: Karsten Keil <kkeil@suse.de>
Cc: Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i4l:add some checks for valid drvid and driver pointer
Date: Thu, 29 Jun 2006 13:29:31 +0200 [thread overview]
Message-ID: <1151580572.3122.30.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <20060629111629.GB9501@pingi.kke.suse.de>
On Thu, 2006-06-29 at 13:16 +0200, Karsten Keil wrote:
> If all drivers go away before all ISDN network interfaces are closed we got
> a OOps on removing interfaces, this patch avoid it.
>
> Signed-off-by: Karsten Keil <kkeil@suse.de>
>
> diff -ur linux-2.6.4.org/drivers/isdn/i4l/isdn_common.c linux-2.6.4/drivers/isdn/i4l/isdn_common.c
> --- linux-2.6.4.org/drivers/isdn/i4l/isdn_common.c 2004-03-11 03:55:25.000000000 +0100
> +++ linux-2.6.4/drivers/isdn/i4l/isdn_common.c 2004-03-30 18:35:38.000000000 +0200
> @@ -341,6 +341,16 @@
> printk(KERN_WARNING "isdn_command command(%x) driver -1\n", cmd->command);
> return(1);
> }
> + if (!dev->drv[cmd->driver]) {
> + printk(KERN_WARNING "isdn_command command(%x) dev->drv[%d] NULL\n",
> + cmd->command, cmd->driver);
> + return(1);
> + }
Hi,
if this is a "legal" condition, you really shouldn't printk about it. If
it's not a normal legal condition, this isn't a fix but a hacky
workaround ;)
Also.. return is not a function, so return 1; is the preferred form,
not return(1)..
Greetings,
Arjan van de Ven
next prev parent reply other threads:[~2006-06-29 11:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-29 11:16 Karsten Keil
2006-06-29 11:29 ` Arjan van de Ven [this message]
2006-06-29 12:23 ` Karsten Keil
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=1151580572.3122.30.camel@laptopd505.fenrus.org \
--to=arjan@infradead.org \
--cc=akpm@osdl.org \
--cc=kkeil@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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
all inboxes | Powered by JetHome®