net: wwan: qcom_bam_dmux: Fix missing pm_runtime_disable()
It's important to undo pm_runtime_use_autosuspend() with
pm_runtime_dont_use_autosuspend() at driver exit time.
But the pm_runtime_disable() and pm_runtime_dont_use_autosuspend()
is missing in the error path for bam_dmux_probe(). So add it.
Found by code review. Compile-tested only.
Fixes: 21a0ffd9b3
("net: wwan: Add Qualcomm BAM-DMUX WWAN network driver")
Suggested-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Reviewed-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
3a39d672e7
commit
d505d3593b
@ -823,17 +823,17 @@ static int bam_dmux_probe(struct platform_device *pdev)
|
|||||||
ret = devm_request_threaded_irq(dev, pc_ack_irq, NULL, bam_dmux_pc_ack_irq,
|
ret = devm_request_threaded_irq(dev, pc_ack_irq, NULL, bam_dmux_pc_ack_irq,
|
||||||
IRQF_ONESHOT, NULL, dmux);
|
IRQF_ONESHOT, NULL, dmux);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
goto err_disable_pm;
|
||||||
|
|
||||||
ret = devm_request_threaded_irq(dev, dmux->pc_irq, NULL, bam_dmux_pc_irq,
|
ret = devm_request_threaded_irq(dev, dmux->pc_irq, NULL, bam_dmux_pc_irq,
|
||||||
IRQF_ONESHOT, NULL, dmux);
|
IRQF_ONESHOT, NULL, dmux);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
goto err_disable_pm;
|
||||||
|
|
||||||
ret = irq_get_irqchip_state(dmux->pc_irq, IRQCHIP_STATE_LINE_LEVEL,
|
ret = irq_get_irqchip_state(dmux->pc_irq, IRQCHIP_STATE_LINE_LEVEL,
|
||||||
&dmux->pc_state);
|
&dmux->pc_state);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
goto err_disable_pm;
|
||||||
|
|
||||||
/* Check if remote finished initialization before us */
|
/* Check if remote finished initialization before us */
|
||||||
if (dmux->pc_state) {
|
if (dmux->pc_state) {
|
||||||
@ -844,6 +844,11 @@ static int bam_dmux_probe(struct platform_device *pdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
err_disable_pm:
|
||||||
|
pm_runtime_disable(dev);
|
||||||
|
pm_runtime_dont_use_autosuspend(dev);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void bam_dmux_remove(struct platform_device *pdev)
|
static void bam_dmux_remove(struct platform_device *pdev)
|
||||||
|
Loading…
Reference in New Issue
Block a user