@@ -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)
Simplify return logic in file tsens-8060.c. Signed-off-by: Carlos Bilbao <carlos.bilbao@amd.com> --- drivers/thermal/qcom/tsens-8960.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-)