diff options
author | Bjorn Andersson <bjorn.andersson@linaro.org> | 2018-05-21 16:39:15 -0700 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2018-05-21 17:24:00 -0700 |
commit | f4c428cfe427e4c5ea6dc47c6fbbfee2b13b31e0 (patch) | |
tree | b6512bba1035d12edfef3ff4910fa2167190aa40 | |
parent | 826950868cd81268913a91b69f00fb6c3f0b6f5b (diff) |
remoteproc: q6v5: Return irq from q6v5_request_irq()
q6v5_request_irq() was supposed to return the irq number, but ret is
overwritten by the request_irq(), fix this and return the IRQ on
success.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
-rw-r--r-- | drivers/remoteproc/qcom_q6v5_pil.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/remoteproc/qcom_q6v5_pil.c b/drivers/remoteproc/qcom_q6v5_pil.c index 56b14c27e275..3736e8608c69 100644 --- a/drivers/remoteproc/qcom_q6v5_pil.c +++ b/drivers/remoteproc/qcom_q6v5_pil.c @@ -1049,22 +1049,23 @@ static int q6v5_request_irq(struct q6v5 *qproc, const char *name, irq_handler_t thread_fn) { + int irq; int ret; - ret = platform_get_irq_byname(pdev, name); - if (ret < 0) { + irq = platform_get_irq_byname(pdev, name); + if (irq < 0) { dev_err(&pdev->dev, "no %s IRQ defined\n", name); - return ret; + return irq; } - ret = devm_request_threaded_irq(&pdev->dev, ret, + ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, thread_fn, IRQF_TRIGGER_RISING | IRQF_ONESHOT, "q6v5", qproc); if (ret) dev_err(&pdev->dev, "request %s IRQ failed\n", name); - return ret; + return ret ? : irq; } static int q6v5_alloc_memory_region(struct q6v5 *qproc) |