From patchwork Tue Jun 28 03:09:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Hung X-Patchwork-Id: 9201743 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 2C97560752 for ; Tue, 28 Jun 2016 03:09:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2016D285BD for ; Tue, 28 Jun 2016 03:09:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 14BF0285D1; Tue, 28 Jun 2016 03:09:54 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham 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 7CF7F285BD for ; Tue, 28 Jun 2016 03:09:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752042AbcF1DJw (ORCPT ); Mon, 27 Jun 2016 23:09:52 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:60389 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752039AbcF1DJv (ORCPT ); Mon, 27 Jun 2016 23:09:51 -0400 Received: from 1.general.alexhung.us.vpn ([10.172.65.254] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1bHjPJ-0001lF-7a; Tue, 28 Jun 2016 03:09:49 +0000 From: Alex Hung To: alex.hung@canonical.com, dvhart@infradead.org, platform-driver-x86@vger.kernel.org Subject: [PATCH] intel-hid: remove duplicated acpi_remove_notify_handler and extra indents Date: Tue, 28 Jun 2016 11:09:42 +0800 Message-Id: <1467083382-31634-1-git-send-email-alex.hung@canonical.com> X-Mailer: git-send-email 2.7.4 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 Signed-off-by: Alex Hung --- drivers/platform/x86/intel-hid.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/platform/x86/intel-hid.c b/drivers/platform/x86/intel-hid.c index a818db6..ed58742 100644 --- a/drivers/platform/x86/intel-hid.c +++ b/drivers/platform/x86/intel-hid.c @@ -122,8 +122,8 @@ static int intel_hid_input_setup(struct platform_device *device) return 0; err_free_device: - input_free_device(priv->input_dev); - return ret; + input_free_device(priv->input_dev); + return ret; } static void intel_hid_input_destroy(struct platform_device *device) @@ -224,7 +224,6 @@ static int intel_hid_remove(struct platform_device *device) acpi_remove_notify_handler(handle, ACPI_DEVICE_NOTIFY, notify_handler); intel_hid_input_destroy(device); intel_hid_set_enable(&device->dev, 0); - acpi_remove_notify_handler(handle, ACPI_DEVICE_NOTIFY, notify_handler); /* * Even if we failed to shut off the event stream, we can still