lkml.org 
[lkml]   [2003]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] fixed type in drivers/char/istallion.c (untested)
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.041 / U:0.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site