From patchwork Thu Dec 3 07:44:47 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Chary X-Patchwork-Id: 64426 X-Patchwork-Delegate: lenb@kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nB37id5R000819 for ; Thu, 3 Dec 2009 07:44:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754268AbZLCHof (ORCPT ); Thu, 3 Dec 2009 02:44:35 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753667AbZLCHod (ORCPT ); Thu, 3 Dec 2009 02:44:33 -0500 Received: from iksaif.net ([88.191.73.63]:44211 "EHLO iksaif.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751020AbZLCHob (ORCPT ); Thu, 3 Dec 2009 02:44:31 -0500 Received: from localhost.localdomain (cxr69-11-88-180-139-205.fbx.proxad.net [88.180.139.205]) (Authenticated sender: corentincj@iksaif.net) by iksaif.net (Postfix) with ESMTPA id 9F3FCC90A28; Thu, 3 Dec 2009 08:46:02 +0100 (CET) From: Corentin Chary To: Len Brown Cc: linux-acpi@vger.kernel.org, Alan Jenkins Subject: [PATCH 03/33] asus-acpi: Remove redundant NULL checks Date: Thu, 3 Dec 2009 08:44:47 +0100 Message-Id: <1259826317-18809-4-git-send-email-corentincj@iksaif.net> X-Mailer: git-send-email 1.6.5.3 In-Reply-To: <1259826317-18809-3-git-send-email-corentincj@iksaif.net> References: <1259826317-18809-1-git-send-email-corentincj@iksaif.net> <1259826317-18809-2-git-send-email-corentincj@iksaif.net> <1259826317-18809-3-git-send-email-corentincj@iksaif.net> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org diff --git a/drivers/platform/x86/asus_acpi.c b/drivers/platform/x86/asus_acpi.c index ddf5240..25a7d57 100644 --- a/drivers/platform/x86/asus_acpi.c +++ b/drivers/platform/x86/asus_acpi.c @@ -1334,9 +1334,6 @@ static int asus_hotk_add(struct acpi_device *device) acpi_status status = AE_OK; int result; - if (!device) - return -EINVAL; - printk(KERN_NOTICE "Asus Laptop ACPI Extras version %s\n", ASUS_ACPI_VERSION); @@ -1392,9 +1389,6 @@ end: static int asus_hotk_remove(struct acpi_device *device, int type) { - if (!device || !acpi_driver_data(device)) - return -EINVAL; - asus_hotk_remove_fs(device); kfree(hotk);