diff mbox series

[thermal:,thermal/next] thermal/drivers/mtk_thermal: Remove redundant initializations of several variables

Message ID 161955266273.29796.17804080313828073962.tip-bot2@tip-bot2
State New
Headers show
Series [thermal:,thermal/next] thermal/drivers/mtk_thermal: Remove redundant initializations of several variables | expand

Commit Message

thermal-bot for Lad Prabhakar April 27, 2021, 7:44 p.m. UTC
The following commit has been merged into the thermal/next branch of thermal:

Commit-ID:     c310e546164d5cca4c12faf9582b75989b030b68
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//c310e546164d5cca4c12faf9582b75989b030b68
Author:        Colin Ian King <colin.king@canonical.com>
AuthorDate:    Thu, 22 Apr 2021 13:04:12 +01:00
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Thu, 22 Apr 2021 23:51:32 +02:00

thermal/drivers/mtk_thermal: Remove redundant initializations of several variables

Several variables are being initialized with values that is never
read and being updated later with a new value. The initializations
are redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20210422120412.246291-1-colin.king@canonical.com
---
 drivers/thermal/mtk_thermal.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/drivers/thermal/mtk_thermal.c b/drivers/thermal/mtk_thermal.c
index 149c6d7..97e8678 100644
--- a/drivers/thermal/mtk_thermal.c
+++ b/drivers/thermal/mtk_thermal.c
@@ -573,12 +573,12 @@  static int raw_to_mcelsius_v1(struct mtk_thermal *mt, int sensno, s32 raw)
 
 static int raw_to_mcelsius_v2(struct mtk_thermal *mt, int sensno, s32 raw)
 {
-	s32 format_1 = 0;
-	s32 format_2 = 0;
-	s32 g_oe = 1;
-	s32 g_gain = 1;
-	s32 g_x_roomt = 0;
-	s32 tmp = 0;
+	s32 format_1;
+	s32 format_2;
+	s32 g_oe;
+	s32 g_gain;
+	s32 g_x_roomt;
+	s32 tmp;
 
 	if (raw == 0)
 		return 0;