mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] irq/proc: throw error number when irq_set_affinity fails in write_irq_affinity()
@ 2017-11-08  1:55 Wen Yang
  2017-11-12 22:31 ` [tip:irq/core] genirq/proc: Return proper error code when irq_set_affinity() fails tip-bot for Wen Yaxng
  0 siblings, 1 reply; 2+ messages in thread
From: Wen Yang @ 2017-11-08  1:55 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel, wen.yang99, jiang.biao2, zhong.weidong

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@zte.com.cn>
Reviewed-by: Jiang Biao <jiang.biao2@zte.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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-12 22:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-08  1:55 [PATCH] irq/proc: throw error number when irq_set_affinity fails in write_irq_affinity() Wen Yang
2017-11-12 22:31 ` [tip:irq/core] genirq/proc: Return proper error code when irq_set_affinity() fails tip-bot for Wen Yaxng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®