> The errors are either reported directly by these functions
> or already reported deeper in the call chain, so additional
> dev_err() and dev_warn() calls are unnecessary.
> @@ -1698,9 +1696,7 @@ static int fsl_sai_probe(struct platform_device *pdev)
> if (ret < 0)
> dev_warn(dev, "Error reading SAI version: %d\n", ret);
>
> - ret = fsl_sai_reset_hw(dev);
> - if (ret < 0)
> - dev_warn(dev, "Failed to reset hardware: %d\n", ret);
> + fsl_sai_reset_hw(dev);
This is the only caller of fsl_sai_reset_hw(), it could just return void
now.
> ret = devm_request_irq(dev, irq, fsl_sai_isr, IRQF_SHARED,
> np->name, sai);
> - if (ret) {
> - dev_err(dev, "failed to claim irq %u\n", irq);
> + if (ret)
> goto err_pm_get_sync;
> - }
This will only print an error for a subset of errors, things like -EBUSY
will now silently fail.
--
Mark Brown <[email protected]>