From patchwork Tue Oct 28 07:40:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Dongdong X-Patchwork-Id: 5171701 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 628449F3ED for ; Tue, 28 Oct 2014 07:24:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7260B20263 for ; Tue, 28 Oct 2014 07:24:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8516B2020E for ; Tue, 28 Oct 2014 07:24:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759142AbaJ1HYT (ORCPT ); Tue, 28 Oct 2014 03:24:19 -0400 Received: from szxga01-in.huawei.com ([119.145.14.64]:4913 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756908AbaJ1HYS (ORCPT ); Tue, 28 Oct 2014 03:24:18 -0400 Received: from 172.24.2.119 (EHLO lggeml424-hub.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CDN78455; Tue, 28 Oct 2014 15:24:15 +0800 (CST) Received: from KernelMiner-T2285.huawei.com (10.107.197.189) by lggeml424-hub.china.huawei.com (10.72.61.34) with Microsoft SMTP Server id 14.3.158.1; Tue, 28 Oct 2014 15:24:04 +0800 From: Yao Dongdong To: , CC: , , Subject: [PATCH 2/2 resend] Thermal:Remove usless if(!result) before return tz Date: Tue, 28 Oct 2014 07:40:25 +0000 Message-ID: <1414482025-4482-2-git-send-email-yaodongdong@huawei.com> X-Mailer: git-send-email 1.8.3.4 In-Reply-To: <1414482025-4482-1-git-send-email-yaodongdong@huawei.com> References: <1414482025-4482-1-git-send-email-yaodongdong@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.107.197.189] X-CFilter-Loop: Reflected Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP result is always zero when comes here. Signed-off-by: Yao Dongdong Acked-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index d358605..a438c95 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -1575,8 +1575,7 @@ struct thermal_zone_device *thermal_zone_device_register(const char *type, thermal_zone_device_update(tz); - if (!result) - return tz; + return tz; unregister: release_idr(&thermal_tz_idr, &thermal_idr_lock, tz->id);