diff options
author | Mark Brown <[email protected]> | 2023-06-09 13:13:51 +0100 |
---|---|---|
committer | Mark Brown <[email protected]> | 2023-06-09 13:13:51 +0100 |
commit | 62a97bea5cce5317d6d7630f7bcf0cdf5333e269 (patch) | |
tree | 598214f5c5884bd366b34009285f8e7c6f96eac0 | |
parent | 7077b1864ca8f0d616c497b3ee890d72d1da0a26 (diff) | |
parent | 8bd81864533bd02d6922deadeed643c813dfe142 (diff) |
Fix error check and cleanup for JH7110 TDM
Merge series from Walker Chen <[email protected]>:
Some minor issues were found during addtional testing and static
analysis. The first patch fix the error check for the return value of
devm_reset_control_array_get_exclusive(). The second patch drop some
unused macros.
-rw-r--r-- | sound/soc/starfive/jh7110_tdm.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/sound/soc/starfive/jh7110_tdm.c b/sound/soc/starfive/jh7110_tdm.c index 973b910d2d3e..e4bdba20c499 100644 --- a/sound/soc/starfive/jh7110_tdm.c +++ b/sound/soc/starfive/jh7110_tdm.c @@ -25,11 +25,8 @@ #include <sound/soc-dai.h> #define TDM_PCMGBCR 0x00 - #define PCMGBCR_MASK 0x1e #define PCMGBCR_ENABLE BIT(0) - #define PCMGBCR_TRITXEN BIT(4) #define CLKPOL_BIT 5 - #define TRITXEN_BIT 4 #define ELM_BIT 3 #define SYNCM_BIT 2 #define MS_BIT 1 @@ -42,11 +39,6 @@ #define LRJ_BIT 1 #define TDM_PCMRXCR 0x08 #define PCMRXCR_RXEN BIT(0) - #define PCMRXCR_RXSL_MASK 0xc - #define PCMRXCR_RXSL_16BIT 0x4 - #define PCMRXCR_RXSL_32BIT 0x8 - #define PCMRXCR_SCALE_MASK 0xf0 - #define PCMRXCR_SCALE_1CH 0x10 #define TDM_PCMDIV 0x0c #define JH7110_TDM_FIFO 0x170c0000 @@ -580,10 +572,9 @@ static int jh7110_tdm_clk_reset_get(struct platform_device *pdev, } tdm->resets = devm_reset_control_array_get_exclusive(&pdev->dev); - if (IS_ERR_OR_NULL(tdm->resets)) { - ret = PTR_ERR(tdm->resets); - dev_err(&pdev->dev, "Failed to get tdm resets"); - return ret; + if (IS_ERR(tdm->resets)) { + dev_err(&pdev->dev, "Failed to get tdm resets\n"); + return PTR_ERR(tdm->resets); } return 0; |