From: bui duc phuc <[email protected]>

fsl_sai_reset_hw() has a single caller, which does not need to
handle its return value. The function already reports register
write failures through dev_err().

Change the return type to void and continue clearing RCSR even
if clearing TCSR fails.

Signed-off-by: bui duc phuc <[email protected]>
---
 sound/soc/fsl/fsl_sai.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index 430e896d064e..59c9b8c28133 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -1410,7 +1410,7 @@ static int fsl_sai_check_version(struct device *dev)
        return 0;
 }
 
-static int fsl_sai_reset_hw(struct device *dev)
+static void fsl_sai_reset_hw(struct device *dev)
 {
        struct fsl_sai *sai = dev_get_drvdata(dev);
        unsigned char ofs = sai->soc_data->reg_offset;
@@ -1421,18 +1421,12 @@ static int fsl_sai_reset_hw(struct device *dev)
         * Bootloader may leave SAI running causing interrupt storm.
         */
        ret = regmap_write(sai->regmap, FSL_SAI_TCSR(ofs), 0);
-       if (ret) {
+       if (ret)
                dev_err(dev, "Failed to clear TCSR: %d\n", ret);
-               return ret;
-       }
 
        ret = regmap_write(sai->regmap, FSL_SAI_RCSR(ofs), 0);
-       if (ret) {
+       if (ret)
                dev_err(dev, "Failed to clear RCSR: %d\n", ret);
-               return ret;
-       }
-
-       return 0;
 }
 
 /*
-- 
2.43.0


Reply via email to