Commit 8f048a26 authored by Andrew Morton's avatar Andrew Morton Committed by Jaroslav Kysela

[PATCH] char/rio/rioctrl: fix ioctl return values

From: "Randy.Dunlap" <rddunlap@osdl.org>

From: Tony Breeds <tony@bakeyournoodle.com>

It fixes 3 places where the ioctl returns positives instead of negatives.
I've gotten feedback from the maintainer (Rogier Wolff (sp?) and he has no
objections.
parent e729d83f
......@@ -522,7 +522,7 @@ RIO_DEBUG_CTRL, if (su)
else {
rio_dprintk (RIO_DEBUG_CTRL, "p->RIOBindTab full! - Rta %x not added\n",
(int) arg);
return 1;
return -ENOMEM;
}
return 0;
}
......@@ -1593,12 +1593,12 @@ RIO_DEBUG_CTRL, if (su)
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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment