Commit 14adddc0 authored by Jan Kiszka's avatar Jan Kiszka
Browse files

ipipe: Let ipipe_enable_irq return an error code

It's time to let ipipe_enable_irq return a proper error as it will gain
another function that may fail. Drop the WARN_ON_ONCE in favor of that.
Signed-off-by: Jan Kiszka's avatarJan Kiszka <>
parent 2d11775a
......@@ -475,7 +475,7 @@ static inline struct ipipe_threadinfo *ipipe_current_threadinfo(void)
#define ipipe_task_threadinfo(p) (&task_thread_info(p)->ipipe_data)
void ipipe_enable_irq(unsigned int irq);
int ipipe_enable_irq(unsigned int irq);
static inline void ipipe_disable_irq(unsigned int irq)
......@@ -1146,7 +1146,7 @@ __fixup_irq_handler(struct irq_desc *desc, irq_flow_handler_t handle, int is_cha
return handle;
void ipipe_enable_irq(unsigned int irq)
int ipipe_enable_irq(unsigned int irq)
struct irq_desc *desc;
struct irq_chip *chip;
......@@ -1154,7 +1154,7 @@ void ipipe_enable_irq(unsigned int irq)
desc = irq_to_desc(irq);
if (desc == NULL)
return -EINVAL;
chip = irq_desc_get_chip(desc);
......@@ -1169,16 +1169,18 @@ void ipipe_enable_irq(unsigned int irq)
raw_spin_unlock_irqrestore(&desc->lock, flags);
return 0;
if (WARN_ON_ONCE(chip->irq_enable == NULL && chip->irq_unmask == NULL))
if (chip->irq_enable == NULL && chip->irq_unmask == NULL)
return -ENOSYS;
if (chip->irq_enable)
return 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment