From patchwork Mon Oct 20 08:27:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Dongdong X-Patchwork-Id: 5103031 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 06D029F374 for ; Mon, 20 Oct 2014 08:28:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0FCD52015E for ; Mon, 20 Oct 2014 08:28:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E030820136 for ; Mon, 20 Oct 2014 08:28:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753050AbaJTI2L (ORCPT ); Mon, 20 Oct 2014 04:28:11 -0400 Received: from szxga01-in.huawei.com ([119.145.14.64]:45676 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753022AbaJTI2K (ORCPT ); Mon, 20 Oct 2014 04:28:10 -0400 Received: from 172.24.2.119 (EHLO szxeml459-hub.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CDB81420; Mon, 20 Oct 2014 16:28:07 +0800 (CST) Received: from [127.0.0.1] (10.110.51.36) by szxeml459-hub.china.huawei.com (10.82.67.202) with Microsoft SMTP Server id 14.3.158.1; Mon, 20 Oct 2014 16:28:00 +0800 Message-ID: <5444C78F.10404@huawei.com> Date: Mon, 20 Oct 2014 16:27:59 +0800 From: Yao Dongdong User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: Zhang Rui , Eduardo Valentin CC: , LKML , Subject: [PATCH 2/2] Thermal:Remove usless if(!result) before return tz X-Originating-IP: [10.110.51.36] 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=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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:yaodongdong@huawei.com Acked-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 1.8.0.1 -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 5b7d466..19cac8e 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -1568,8 +1568,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);