mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-01 10:43:43 +00:00
remoteproc: da8xx: Simplify with dev_err_probe()
Use dev_err_probe() to make error and defer code handling simpler. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241011-remote-proc-dev-err-probe-v1-2-5abb4fc61eca@linaro.org Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
This commit is contained in:
parent
fe03acd4b1
commit
e1433706f3
@ -251,10 +251,8 @@ static int da8xx_rproc_probe(struct platform_device *pdev)
|
|||||||
return irq;
|
return irq;
|
||||||
|
|
||||||
irq_data = irq_get_irq_data(irq);
|
irq_data = irq_get_irq_data(irq);
|
||||||
if (!irq_data) {
|
if (!irq_data)
|
||||||
dev_err(dev, "irq_get_irq_data(%d): NULL\n", irq);
|
return dev_err_probe(dev, -EINVAL, "irq_get_irq_data(%d): NULL\n", irq);
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
bootreg = devm_platform_ioremap_resource_byname(pdev, "host1cfg");
|
bootreg = devm_platform_ioremap_resource_byname(pdev, "host1cfg");
|
||||||
if (IS_ERR(bootreg))
|
if (IS_ERR(bootreg))
|
||||||
@ -269,21 +267,13 @@ static int da8xx_rproc_probe(struct platform_device *pdev)
|
|||||||
return dev_err_probe(dev, PTR_ERR(dsp_clk), "clk_get error\n");
|
return dev_err_probe(dev, PTR_ERR(dsp_clk), "clk_get error\n");
|
||||||
|
|
||||||
dsp_reset = devm_reset_control_get_exclusive(dev, NULL);
|
dsp_reset = devm_reset_control_get_exclusive(dev, NULL);
|
||||||
if (IS_ERR(dsp_reset)) {
|
if (IS_ERR(dsp_reset))
|
||||||
if (PTR_ERR(dsp_reset) != -EPROBE_DEFER)
|
return dev_err_probe(dev, PTR_ERR(dsp_reset), "unable to get reset control\n");
|
||||||
dev_err(dev, "unable to get reset control: %ld\n",
|
|
||||||
PTR_ERR(dsp_reset));
|
|
||||||
|
|
||||||
return PTR_ERR(dsp_reset);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dev->of_node) {
|
if (dev->of_node) {
|
||||||
ret = of_reserved_mem_device_init(dev);
|
ret = of_reserved_mem_device_init(dev);
|
||||||
if (ret) {
|
if (ret)
|
||||||
dev_err(dev, "device does not have specific CMA pool: %d\n",
|
return dev_err_probe(dev, ret, "device does not have specific CMA pool\n");
|
||||||
ret);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rproc = rproc_alloc(dev, "dsp", &da8xx_rproc_ops, da8xx_fw_name,
|
rproc = rproc_alloc(dev, "dsp", &da8xx_rproc_ops, da8xx_fw_name,
|
||||||
|
Loading…
Reference in New Issue
Block a user