diff options
Diffstat (limited to 'drivers/thermal')
-rw-r--r-- | drivers/thermal/qcom/tsens-v1.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/thermal/qcom/tsens-v1.c b/drivers/thermal/qcom/tsens-v1.c index 2d1077b64887..bd2ddb684a45 100644 --- a/drivers/thermal/qcom/tsens-v1.c +++ b/drivers/thermal/qcom/tsens-v1.c @@ -240,10 +240,8 @@ static int calibrate_8976(struct tsens_priv *priv) u32 *qfprom_cdata; qfprom_cdata = (u32 *)qfprom_read(priv->dev, "calib"); - if (IS_ERR(qfprom_cdata)) { - kfree(qfprom_cdata); + if (IS_ERR(qfprom_cdata)) return PTR_ERR(qfprom_cdata); - } mode = (qfprom_cdata[4] & MSM8976_CAL_SEL_MASK); dev_dbg(priv->dev, "calibration mode is %d\n", mode); |