aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mfd/twl6030-irq.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c
index eb3b5f88e566..776402566c9e 100644
--- a/drivers/mfd/twl6030-irq.c
+++ b/drivers/mfd/twl6030-irq.c
@@ -331,12 +331,6 @@ int twl6030_init_irq(int irq_num, unsigned irq_base, unsigned irq_end)
331 331
332 /* install an irq handler to demultiplex the TWL6030 interrupt */ 332 /* install an irq handler to demultiplex the TWL6030 interrupt */
333 init_completion(&irq_event); 333 init_completion(&irq_event);
334 task = kthread_run(twl6030_irq_thread, (void *)irq_num, "twl6030-irq");
335 if (IS_ERR(task)) {
336 pr_err("twl6030: could not create irq %d thread!\n", irq_num);
337 status = PTR_ERR(task);
338 goto fail_kthread;
339 }
340 334
341 status = request_irq(irq_num, handle_twl6030_pih, IRQF_DISABLED, 335 status = request_irq(irq_num, handle_twl6030_pih, IRQF_DISABLED,
342 "TWL6030-PIH", &irq_event); 336 "TWL6030-PIH", &irq_event);
@@ -344,11 +338,19 @@ int twl6030_init_irq(int irq_num, unsigned irq_base, unsigned irq_end)
344 pr_err("twl6030: could not claim irq%d: %d\n", irq_num, status); 338 pr_err("twl6030: could not claim irq%d: %d\n", irq_num, status);
345 goto fail_irq; 339 goto fail_irq;
346 } 340 }
341
342 task = kthread_run(twl6030_irq_thread, (void *)irq_num, "twl6030-irq");
343 if (IS_ERR(task)) {
344 pr_err("twl6030: could not create irq %d thread!\n", irq_num);
345 status = PTR_ERR(task);
346 goto fail_kthread;
347 }
347 return status; 348 return status;
348fail_irq:
349 free_irq(irq_num, &irq_event);
350 349
351fail_kthread: 350fail_kthread:
351 free_irq(irq_num, &irq_event);
352
353fail_irq:
352 for (i = irq_base; i < irq_end; i++) 354 for (i = irq_base; i < irq_end; i++)
353 irq_set_chip_and_handler(i, NULL, NULL); 355 irq_set_chip_and_handler(i, NULL, NULL);
354 return status; 356 return status;