linux-2.6.15.4/drivers/i2c/i2c-core.c.bak: EPERM -> EINVAL
Hi list,
it was noticed that some driver return EPERM instead of EINVAL. EPERM indicates no enought privilege to access a function. This will fixit an return (i hope) a 'better' error msg.
re,
walter
--- linux-2.6.15.4/drivers/i2c/i2c-core.c.bak 2006-02-25
13:25:48.000000000 +0100
+++ linux-2.6.15.4/drivers/i2c/i2c-core.c 2006-02-25 13:24:44.000000000
+0100
@@ -522,7 +522,7 @@
else {
pr_debug("i2c-core: %s used one too many times\n",
__FUNCTION__);
- return -EPERM;
+ return -EINVAL;
}
}
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
Review
Quoted 4 lines · walter harms
pr_debug("i2c-core: %s used one too many times\n",
__FUNCTION__);(quoted diff) +1
-1- return -EPERM; + return -EINVAL;
I think EBUSY would be more apprioriate here. I'm not sure, though. include/asm-generic/errno-base.h has a short description for each errno.
Tim
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
hi all,
imho EBUSY would indicate someone else is using it. But < 0 should never happen (integer overflow ?). even BUG() would be ok but the author decided otherwise and i do not what to change that.
re,
walter
tim: do you know this ?
http://dev1.boomersdomain.com/cgi-bin/store_pedalinghistory_2/01068.html
Quoted 12 lines · Tim Cooijmans
Review
Quoted 4 lines · walter harms
pr_debug("i2c-core: %s used one too many times\n",
__FUNCTION__);(quoted diff) +1
-1- return -EPERM; + return -EINVAL;I think EBUSY would be more apprioriate here. I'm not sure, though.
include/asm-generic/errno-base.hhas a short description for each errno.Tim
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 4 lines · walter harms
hi all,
imho EBUSY would indicate someone else is using it. But < 0 should never happen (integer overflow ?). evenBUG()would be ok but the author decided otherwise and i do not what to change that.
Oh wait, I thought the function would try to set something up and fail at that. Didn't see it was only trying to release stuff.
Quoted 2 lines
tim: do you know this ?
http://dev1.boomersdomain.com/cgi-bin/store_pedalinghistory_2/01068.html
Hahahaha, yes, that does look familiar.
Tim
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors