[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220713145655.3844109-2-carlos.bilbao@amd.com>
Date: Wed, 13 Jul 2022 09:56:54 -0500
From: Carlos Bilbao <carlos.bilbao@....com>
To: <bjorn.andersson@...aro.org>, <amitk@...nel.org>,
<thara.gopinath@...il.com>, <konrad.dybcio@...ainline.org>
CC: <agross@...nel.org>, <david.brown@...aro.org>,
<linux-pm@...r.kernel.org>, <linux-arm-msm@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <bilbao@...edu>,
Carlos Bilbao <carlos.bilbao@....com>
Subject: [PATCH 1/4] thermal/drivers/qcom: Simplify returns for tsens-8060.c
Simplify return logic in file tsens-8060.c.
Signed-off-by: Carlos Bilbao <carlos.bilbao@....com>
---
drivers/thermal/qcom/tsens-8960.c | 24 ++++--------------------
1 file changed, 4 insertions(+), 20 deletions(-)
diff --git a/drivers/thermal/qcom/tsens-8960.c b/drivers/thermal/qcom/tsens-8960.c
index 8d9b721dadb6..f4fc8a1c161e 100644
--- a/drivers/thermal/qcom/tsens-8960.c
+++ b/drivers/thermal/qcom/tsens-8960.c
@@ -75,11 +75,7 @@ static int suspend_8960(struct tsens_priv *priv)
else
mask = SLP_CLK_ENA_8660 | EN;
- ret = regmap_update_bits(map, CNTL_ADDR, mask, 0);
- if (ret)
- return ret;
-
- return 0;
+ return regmap_update_bits(map, CNTL_ADDR, mask, 0);
}
static int resume_8960(struct tsens_priv *priv)
@@ -105,11 +101,7 @@ static int resume_8960(struct tsens_priv *priv)
if (ret)
return ret;
- ret = regmap_write(map, CNTL_ADDR, priv->ctx.control);
- if (ret)
- return ret;
-
- return 0;
+ return regmap_write(map, CNTL_ADDR, priv->ctx.control);
}
static int enable_8960(struct tsens_priv *priv, int id)
@@ -131,11 +123,7 @@ static int enable_8960(struct tsens_priv *priv, int id)
else
reg |= mask | SLP_CLK_ENA_8660 | EN;
- ret = regmap_write(priv->tm_map, CNTL_ADDR, reg);
- if (ret)
- return ret;
-
- return 0;
+ return regmap_write(priv->tm_map, CNTL_ADDR, reg);
}
static void disable_8960(struct tsens_priv *priv)
@@ -205,11 +193,7 @@ static int init_8960(struct tsens_priv *priv)
return ret;
reg_cntl |= EN;
- ret = regmap_write(priv->tm_map, CNTL_ADDR, reg_cntl);
- if (ret)
- return ret;
-
- return 0;
+ return regmap_write(priv->tm_map, CNTL_ADDR, reg_cntl);
}
static int calibrate_8960(struct tsens_priv *priv)
--
2.31.1
Powered by blists - more mailing lists