From: Jeff Xie Date: Mon, 26 Aug 2024 14:58:05 +0000 (+0800) Subject: genirq/proc: Change the return value for set affinity permission error X-Git-Tag: v6.12-rc1~195^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb29369fa543e7d5557c19ebecf072244bb14815;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20240826145805.5938-1-jeff.xie@linux.dev --- diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c index d98fb9c2c6679..9081ada81c3d0 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;