From patchwork Sat Dec 2 13:45:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 10088633 X-Patchwork-Delegate: dvhart@infradead.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2D0AB60234 for ; Sat, 2 Dec 2017 13:56:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2104A29955 for ; Sat, 2 Dec 2017 13:56:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 160A629F6E; Sat, 2 Dec 2017 13:56:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AAC4729955 for ; Sat, 2 Dec 2017 13:56:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751943AbdLBN4N (ORCPT ); Sat, 2 Dec 2017 08:56:13 -0500 Received: from forward101j.mail.yandex.net ([5.45.198.241]:55233 "EHLO forward101j.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751908AbdLBN4K (ORCPT ); Sat, 2 Dec 2017 08:56:10 -0500 X-Greylist: delayed 557 seconds by postgrey-1.27 at vger.kernel.org; Sat, 02 Dec 2017 08:56:09 EST Received: from mxback18j.mail.yandex.net (mxback18j.mail.yandex.net [IPv6:2a02:6b8:0:1619::94]) by forward101j.mail.yandex.net (Yandex) with ESMTP id A753B1244984; Sat, 2 Dec 2017 16:46:50 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback18j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id loZ08jl3FQ-knZCIuJr; Sat, 02 Dec 2017 16:46:50 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; s=mail; t=1512222410; bh=QN8gzkxENvArvudWAmbE/2Y9Cyv5wROO+zGjF7GyNG0=; h=From:To:Cc:Subject:Date:Message-Id; b=YUNikZI2dlq3GzD/aMs/xeiKqJNlQElk6xXYYkvzdsfTch+i+umUPei4F7CPoU/rv AyQA+fJffEjNZYu3pqODB6hAYUKY3xfJgcgCPi6+7Bal74TURfwzi7DPDsyJQNXzuY Nj2OSFEGgMVUQ4Sot/wbxxzTuZwtVKLDFjqN00vg= Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id PgVxNyvuaE-kcwatNI3; Sat, 02 Dec 2017 16:46:43 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; s=mail; t=1512222407; bh=QN8gzkxENvArvudWAmbE/2Y9Cyv5wROO+zGjF7GyNG0=; h=From:To:Cc:Subject:Date:Message-Id; b=qSpjFIM/SjeiFV6q7xrx/x4xbllzS97b3mf4jiFhWCKcsrTTFE5K2XZaTzVc/mIp6 VZEBNctl++6+b9Yea4S6LkoRwlKzKY33SWEGb3GEbIo7f2250MmhAKMcztv1S3sm78 sURYHWOmGCnuumIhCJ/Na/3fAzY70Fq557SMcbMA= Authentication-Results: smtp3o.mail.yandex.net; dkim=pass header.i=@flygoat.com From: Jiaxun Yang To: Ike Panhc Cc: Darren Hart , Andy Shevchenko , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Roger Jargoyhen , Jiaxun Yang Subject: [PATCH 1/4] platform/x86: ideapad-laptop: Remove unnesscary else Date: Sat, 2 Dec 2017 21:45:31 +0800 Message-Id: <20171202134534.3252-1-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.14.1 Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP To deal with checkpatch warning: WARNING: else is not generally useful after a break or return Signed-off-by: Jiaxun Yang --- drivers/platform/x86/ideapad-laptop.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c index 53ab4e0f8962..9f2a4bc58df0 100644 --- a/drivers/platform/x86/ideapad-laptop.c +++ b/drivers/platform/x86/ideapad-laptop.c @@ -124,10 +124,10 @@ static int read_method_int(acpi_handle handle, const char *method, int *val) if (ACPI_FAILURE(status)) { *val = -1; return -1; - } else { - *val = result; - return 0; } + *val = result; + return 0; + } static int method_gbmd(acpi_handle handle, unsigned long *ret) @@ -164,10 +164,10 @@ static int method_vpcr(acpi_handle handle, int cmd, int *ret) if (ACPI_FAILURE(status)) { *ret = -1; return -1; - } else { - *ret = result; - return 0; } + *ret = result; + return 0; + } static int method_vpcw(acpi_handle handle, int cmd, int data)