[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1510106103-184761-1-git-send-email-wen.yang99@zte.com.cn>
Date: Wed, 8 Nov 2017 09:55:03 +0800
From: Wen Yang <wen.yang99@....com.cn>
To: tglx@...utronix.de
Cc: linux-kernel@...r.kernel.org, wen.yang99@....com.cn,
jiang.biao2@....com.cn, zhong.weidong@....com.cn
Subject: [PATCH] irq/proc: throw error number when irq_set_affinity fails in write_irq_affinity()
When irq_set_affinity() fails in write_irq_affinity(), it'll not throw error number like,
https://bugzilla.kernel.org/show_bug.cgi?id=197795
This patch should fix that.
Signed-off-by: Wen Yang <wen.yang99@....com.cn>
Reviewed-by: Jiang Biao <jiang.biao2@....com.cn>
---
kernel/irq/proc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c
index 7f9642a..574d41c 100644
--- a/kernel/irq/proc.c
+++ b/kernel/irq/proc.c
@@ -154,8 +154,9 @@ static ssize_t write_irq_affinity(int type, struct file *file,
*/
err = irq_select_affinity_usr(irq) ? -EINVAL : count;
} else {
- irq_set_affinity(irq, new_value);
- err = count;
+ err = irq_set_affinity(irq, new_value);
+ if(!err)
+ err = count;
}
free_cpumask:
--
1.8.3.1
Powered by blists - more mailing lists