ASoC: ti: davinci-mcasp: remove always zero of davinci_mcasp_get_dt_params
davinci_mcasp_get_dt_params alway return zero, and its return value could be ignored by the caller. So make it 'void' type to avoid the check its return value. Fixes: 764958f2b5239 ("ASoC: ti: davinci-mcasp: Support for auxclk-fs-ratio") Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/20201102103428.32678-1-zhangqilong3@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
99503469bd
commit
19f6e424d6
@ -2110,20 +2110,18 @@ static inline int davinci_mcasp_init_gpiochip(struct davinci_mcasp *mcasp)
|
|||||||
}
|
}
|
||||||
#endif /* CONFIG_GPIOLIB */
|
#endif /* CONFIG_GPIOLIB */
|
||||||
|
|
||||||
static int davinci_mcasp_get_dt_params(struct davinci_mcasp *mcasp)
|
static void davinci_mcasp_get_dt_params(struct davinci_mcasp *mcasp)
|
||||||
{
|
{
|
||||||
struct device_node *np = mcasp->dev->of_node;
|
struct device_node *np = mcasp->dev->of_node;
|
||||||
int ret;
|
int ret;
|
||||||
u32 val;
|
u32 val;
|
||||||
|
|
||||||
if (!np)
|
if (!np)
|
||||||
return 0;
|
return;
|
||||||
|
|
||||||
ret = of_property_read_u32(np, "auxclk-fs-ratio", &val);
|
ret = of_property_read_u32(np, "auxclk-fs-ratio", &val);
|
||||||
if (ret >= 0)
|
if (ret >= 0)
|
||||||
mcasp->auxclk_fs_ratio = val;
|
mcasp->auxclk_fs_ratio = val;
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int davinci_mcasp_probe(struct platform_device *pdev)
|
static int davinci_mcasp_probe(struct platform_device *pdev)
|
||||||
@ -2359,9 +2357,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
ret = davinci_mcasp_get_dt_params(mcasp);
|
davinci_mcasp_get_dt_params(mcasp);
|
||||||
if (ret)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
ret = devm_snd_soc_register_component(&pdev->dev,
|
ret = devm_snd_soc_register_component(&pdev->dev,
|
||||||
&davinci_mcasp_component,
|
&davinci_mcasp_component,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user