From: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
To: support@stallion.oz.au
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] fixed type in drivers/char/istallion.c (untested)
Date: Tue, 4 Feb 2003 16:42:31 +0100 [thread overview]
Message-ID: <20030204154231.GA22154@wohnheim.fh-wedel.de> (raw)
Hi!
The condition "(portp->brdnr < 0) && (portp->brdnr >= stli_nrbrds)" is
very hard to fulfill. I guess, this is a simple typo.
Jörn
--
Anything that can go wrong, will.
-- Finagle's Law
--- linux-2.4.21-pre3-ac4/drivers/char/istallion.c Sat Aug 3 02:39:43 2002
+++ scratch/drivers/char/istallion.c Tue Feb 4 16:09:19 2003
@@ -1501,27 +1501,27 @@
static int stli_setport(stliport_t *portp)
{
stlibrd_t *brdp;
asyport_t aport;
#if DEBUG
printk("stli_setport(portp=%x)\n", (int) portp);
#endif
if (portp == (stliport_t *) NULL)
return(-ENODEV);
if (portp->tty == (struct tty_struct *) NULL)
return(-ENODEV);
- if ((portp->brdnr < 0) && (portp->brdnr >= stli_nrbrds))
+ if ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
return(-ENODEV);
brdp = stli_brds[portp->brdnr];
if (brdp == (stlibrd_t *) NULL)
return(-ENODEV);
stli_mkasyport(portp, &aport, portp->tty->termios);
return(stli_cmdwait(brdp, portp, A_SETPORT, &aport, sizeof(asyport_t), 0));
}
/*****************************************************************************/
/*
* Wait for a specified delay period, this is not a busy-loop. It will
reply other threads:[~2003-02-04 15:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20030204154231.GA22154@wohnheim.fh-wedel.de \
--to=joern@wohnheim.fh-wedel.de \
--cc=linux-kernel@vger.kernel.org \
--cc=support@stallion.oz.au \
/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®