From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752064AbbJHFfX (ORCPT ); Thu, 8 Oct 2015 01:35:23 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:26185 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751954AbbJHFfS (ORCPT ); Thu, 8 Oct 2015 01:35:18 -0400 X-AuditID: cbfec7f5-f794b6d000001495-25-56160094450a From: Krzysztof Kozlowski To: Lukasz Majewski , Zhang Rui , Eduardo Valentin , Kukjin Kim , Krzysztof Kozlowski , linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/5] thermal: exynos: Directly return 0 instead of using local ret variable Date: Thu, 08 Oct 2015 14:34:06 +0900 Message-id: <1444282446-6419-5-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1444282446-6419-1-git-send-email-k.kozlowski@samsung.com> References: <1444282446-6419-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprKLMWRmVeSWpSXmKPExsVy+t/xa7pTGMTCDI6vZbeYf+Uaq8XrF4YW /Y9fM1u8ebiZ0WLTY6DQ5V1z2Cw+9x5htJhxfh+TxZOHfWwOnB47Z91l91i85yWTx6ZVnWwe m5fUe/RtWcXo8XmTXABbFJdNSmpOZllqkb5dAlfG4abbjAUNXBWvZjUzNzDu4Ohi5OCQEDCR ePHCuYuRE8gUk7hwbz1bFyMXh5DAUkaJhYc7oJz/jBIbv79mB6liEzCW2Lx8CVhCROAMk8TJ jq2MIAlhgViJvj+H2EBsFgFViRu9m1lAbF4BN4mf/bfZIVbISZw8NpkVxOYUcJd4d+MwWK8Q UM3aBfNYJzDyLGBkWMUomlqaXFCclJ5rpFecmFtcmpeul5yfu4kRElhfdzAuPWZ1iFGAg1GJ h/eHsUiYEGtiWXFl7iFGCQ5mJRHenfNFw4R4UxIrq1KL8uOLSnNSiw8xSnOwKInzztz1PkRI ID2xJDU7NbUgtQgmy8TBKdXAuEn5DMcBK87w6V635Kb+W7GTKUpt8lIWfatf364/4dqb6vGR 6Sen0avshUdNUu3rNspK5dlKXbqYfETvT/vfTfv3vghtl1/6IMG+o+hL0y+h9O6A3S8qJ6Qu EOfz6fTSSv3uKqHINCv3mKy71sob1Q8W3H6wtUxllZzhiz8Ra/xPvkuYK/jpvxJLcUaioRZz UXEiABCYhc4oAgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The 'ret' variable in exynos5440_tmu_initialize() is initialized to 0 and returned as is. Replace it with direct return statement. This also fixes coccinelle warning: drivers/thermal/samsung/exynos_tmu.c:611:5-8: Unneeded variable: "ret". Return "0" on line 654 Signed-off-by: Krzysztof Kozlowski --- drivers/thermal/samsung/exynos_tmu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 1af7ea8dda71..f340e6edcb49 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -608,7 +608,7 @@ static int exynos5440_tmu_initialize(struct platform_device *pdev) { struct exynos_tmu_data *data = platform_get_drvdata(pdev); unsigned int trim_info = 0, con, rising_threshold; - int ret = 0, threshold_code; + int threshold_code; int crit_temp = 0; /* @@ -651,7 +651,8 @@ static int exynos5440_tmu_initialize(struct platform_device *pdev) /* Clear the PMIN in the common TMU register */ if (!data->id) writel(0, data->base_second + EXYNOS5440_TMU_PMIN); - return ret; + + return 0; } static int exynos7_tmu_initialize(struct platform_device *pdev) -- 1.9.1