From patchwork Mon Oct 12 11:14:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roel Kluin X-Patchwork-Id: 53098 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 n9CB8a56022067 for ; Mon, 12 Oct 2009 11:08:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756156AbZJLLFz (ORCPT ); Mon, 12 Oct 2009 07:05:55 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753934AbZJLLFz (ORCPT ); Mon, 12 Oct 2009 07:05:55 -0400 Received: from mail-ew0-f208.google.com ([209.85.219.208]:43530 "EHLO mail-ew0-f208.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756156AbZJLLFz (ORCPT ); Mon, 12 Oct 2009 07:05:55 -0400 Received: by ewy4 with SMTP id 4so2351140ewy.37 for ; Mon, 12 Oct 2009 04:05:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=BTg1iOA4vVDdD3RYljP06tKlgHMRbo8CNXD3xHBEmvA=; b=xbLuQA210NWyvi/yX1p2Qp8NS9KW6PttMOAKH9Cffs9yU0kDkWe1hSIZ44LPMHKVUM 27b6lb1ToOoKVoEK+hVB5EzdaT1rG7Cme2p0EHwc8mc36ZwYqiEZFjA7BLKe0Ysf0Qc9 A6/mTVcDQ8OqjYcdTZIBEBgak0UXr4EXRmNe0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=WRTEqXdOYRu/RFFj44rlkKfB6zDFzx3xjQ7SCT64gq9DfmeAxSmrl/SGWff7kI8xSl WiyPHAveSpT3S/g/RcRMQETomk8xECsE/5r8rl/6Ulkyztv3VFWFd78JU+r2bsoNH/bg +2KFpK10GqdDhAam4XHLgvP6n3WTVSL6dnfmU= Received: by 10.211.138.14 with SMTP id q14mr6918704ebn.18.1255345517719; Mon, 12 Oct 2009 04:05:17 -0700 (PDT) Received: from zoinx.mars (d133062.upc-d.chello.nl [213.46.133.62]) by mx.google.com with ESMTPS id 10sm12005eyz.4.2009.10.12.04.05.16 (version=SSLv3 cipher=RC4-MD5); Mon, 12 Oct 2009 04:05:16 -0700 (PDT) Message-ID: <4AD30F98.4010904@gmail.com> Date: Mon, 12 Oct 2009 13:14:32 +0200 From: Roel Kluin User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20090922 Fedora/3.0-2.7.b4.fc11 Thunderbird/3.0b4 MIME-Version: 1.0 To: Jonathan Woithe , linux-acpi@vger.kernel.org, Andrew Morton Subject: [PATCH] fujitsu-laptop: Fix tests of acpi_evaluate_integer() return 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/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c index f35aee5..e3c21ee 100644 --- a/drivers/platform/x86/fujitsu-laptop.c +++ b/drivers/platform/x86/fujitsu-laptop.c @@ -376,7 +376,7 @@ static int get_lcd_level(void) status = acpi_evaluate_integer(fujitsu->acpi_handle, "GBLL", NULL, &state); - if (status < 0) + if (ACPI_FAILURE(status)) return status; fujitsu->brightness_level = state & 0x0fffffff; @@ -398,7 +398,7 @@ static int get_max_brightness(void) status = acpi_evaluate_integer(fujitsu->acpi_handle, "RBLL", NULL, &state); - if (status < 0) + if (ACPI_FAILURE(status)) return status; fujitsu->max_brightness = state;