Skip to content

Commit eb29369

Browse files
Jeff XieKAGA-KOKO
authored andcommitted
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
1 parent 9012f84 commit eb29369

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kernel/irq/proc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ static ssize_t write_irq_affinity(int type, struct file *file,
140140
int err;
141141

142142
if (!irq_can_set_affinity_usr(irq) || no_irq_affinity)
143-
return -EIO;
143+
return -EPERM;
144144

145145
if (!zalloc_cpumask_var(&new_value, GFP_KERNEL))
146146
return -ENOMEM;

0 commit comments

Comments
 (0)