From patchwork Tue Jan 11 12:43:40 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jamie Iles X-Patchwork-Id: 471421 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0BClUk0024846 for ; Tue, 11 Jan 2011 12:47:52 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932119Ab1AKMrk (ORCPT ); Tue, 11 Jan 2011 07:47:40 -0500 Received: from mail-wy0-f174.google.com ([74.125.82.174]:45082 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755990Ab1AKMoW (ORCPT ); Tue, 11 Jan 2011 07:44:22 -0500 Received: by mail-wy0-f174.google.com with SMTP id 28so20414600wyb.19 for ; Tue, 11 Jan 2011 04:44:21 -0800 (PST) Received: by 10.227.128.73 with SMTP id j9mr983067wbs.90.1294749861199; Tue, 11 Jan 2011 04:44:21 -0800 (PST) Received: from localhost (cpc1-chap8-2-0-cust102.aztw.cable.virginmedia.com [94.169.120.103]) by mx.google.com with ESMTPS id m10sm20911134wbc.10.2011.01.11.04.44.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 11 Jan 2011 04:44:20 -0800 (PST) From: Jamie Iles To: linux-kernel@vger.kernel.org Cc: Jamie Iles , Cyril Chemparathy , linux-input@vger.kernel.org Subject: [PATCH 03/16] input: tnetv107x-keypad: don't treat NULL clk as an error Date: Tue, 11 Jan 2011 12:43:40 +0000 Message-Id: <1294749833-32019-4-git-send-email-jamie@jamieiles.com> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1294749833-32019-1-git-send-email-jamie@jamieiles.com> References: <1294749833-32019-1-git-send-email-jamie@jamieiles.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 11 Jan 2011 12:47:52 +0000 (UTC) diff --git a/drivers/input/keyboard/tnetv107x-keypad.c b/drivers/input/keyboard/tnetv107x-keypad.c index b4a81eb..c8f097a 100644 --- a/drivers/input/keyboard/tnetv107x-keypad.c +++ b/drivers/input/keyboard/tnetv107x-keypad.c @@ -14,6 +14,7 @@ */ #include +#include #include #include #include @@ -219,9 +220,9 @@ static int __devinit keypad_probe(struct platform_device *pdev) } kp->clk = clk_get(dev, NULL); - if (!kp->clk) { + if (IS_ERR(kp->clk)) { dev_err(dev, "cannot claim device clock\n"); - error = -EINVAL; + error = PTR_ERR(kp->clk); goto error_clk; }