Subject: [PATCH] 2.5.50 drivers/char/rio/rioctrl.c

Hello All,
This patch continues the work started by Arnaldo Carvalho de Melo
<[email protected]>. It converts a couple of possible return EPERM to
return -EPERM. It also changes a generic return 1 to return -ENOMEM

--------------------------------------------------------------------------------
diff -X dontdiff -urN linux-2.5.50.clean/drivers/char/rio/rioctrl.c linux-2.5.50.rio/drivers/char/rio/rioctrl.c
--- linux-2.5.50.clean/drivers/char/rio/rioctrl.c 2002-12-04 17:50:09.000000000 +0800
+++ linux-2.5.50.rio/drivers/char/rio/rioctrl.c 2002-12-05 11:08:44.000000000 +0800
@@ -524,7 +524,7 @@
else {
rio_dprintk (RIO_DEBUG_CTRL, "p->RIOBindTab full! - Rta %x not added\n",
(int) arg);
- return 1;
+ return -ENOMEM;
}
return 0;
}
@@ -1595,12 +1595,12 @@
case RIO_NO_MESG:
if ( su )
p->RIONoMessage = 1;
- return su ? 0 : EPERM;
+ return su ? 0 : -EPERM;

case RIO_MESG:
if ( su )
p->RIONoMessage = 0;
- return su ? 0 : EPERM;
+ return su ? 0 : -EPERM;

case RIO_WHAT_MESG:
if ( copyout( (caddr_t)&p->RIONoMessage, (int)arg,
--------------------------------------------------------------------------------

Yours Tony

Jan 22-25 2003 Linux.Conf.AU http://linux.conf.au/
The Australian Linux Technical Conference!