[PATCH] genirq/procfs: Change the return value for set affinity permission error
From: Jeff Xie
Date: Mon Aug 26 2024 - 10:59:48 EST
Currently, when the affinity of an irq cannot be set due to lack of
permission, the write_irq_affinity() returns the error code -EIO
Obviously, due to a permissions error, it should return -EPERM
Signed-off-by: Jeff Xie <jeff.xie@xxxxxxxxx>
---
kernel/irq/proc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c
index dcf8190a58ca..7b3a4c92d148 100644
--- a/kernel/irq/proc.c
+++ b/kernel/irq/proc.c
@@ -142,7 +142,7 @@ static ssize_t write_irq_affinity(int type, struct file *file,
int err;
if (!irq_can_set_affinity_usr(irq) || no_irq_affinity)
- return -EIO;
+ return -EPERM;
if (!zalloc_cpumask_var(&new_value, GFP_KERNEL))
return -ENOMEM;
--
2.43.0