diff options
author | Jeff Xie <jeff.xie@linux.dev> | 2024-08-26 22:58:05 +0800 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2024-08-29 16:42:06 +0200 |
commit | eb29369fa543e7d5557c19ebecf072244bb14815 (patch) | |
tree | bab8972a0540d4e974bae6134919c5846febeb14 | |
parent | 9012f84e1c5b653c282b7a6cca81454ecf7c5a0a (diff) | |
download | linux-eb29369fa543e7d5557c19ebecf072244bb14815.tar.gz linux-eb29369fa543e7d5557c19ebecf072244bb14815.tar.bz2 linux-eb29369fa543e7d5557c19ebecf072244bb14815.zip |
genirq/proc: Change the return value for set affinity permission error
Currently, when the affinity of an irq cannot be set due to lack of
permission, the write_irq_affinity() returns the error code -EIO.
Change the return value to -EPERM as that reflects the cause of error
correctly.
Signed-off-by: Jeff Xie <jeff.xie@linux.dev>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20240826145805.5938-1-jeff.xie@linux.dev
-rw-r--r-- | kernel/irq/proc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c index d98fb9c2c667..9081ada81c3d 100644 --- a/kernel/irq/proc.c +++ b/kernel/irq/proc.c @@ -140,7 +140,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; |