From patchwork Wed Jul 4 09:00:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Barry Song X-Patchwork-Id: 1155351 Return-Path: X-Original-To: patchwork-spi-devel-general@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by patchwork2.kernel.org (Postfix) with ESMTP id DB84FDFF0F for ; Wed, 4 Jul 2012 09:27:41 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1SmLs5-0002yl-5t; Wed, 04 Jul 2012 09:27:41 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1SmLs3-0002ya-Re for spi-devel-general@lists.sourceforge.net; Wed, 04 Jul 2012 09:27:39 +0000 X-ACL-Warn: Received: from cluster-g.mailcontrol.com ([208.87.233.190]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1SmLrz-0001az-CI for spi-devel-general@lists.sourceforge.net; Wed, 04 Jul 2012 09:27:39 +0000 Received: from rly21g.srv.mailcontrol.com (localhost.localdomain [127.0.0.1]) by rly21g.srv.mailcontrol.com (MailControl) with ESMTP id q6491Gl4004986 for ; Wed, 4 Jul 2012 10:01:19 +0100 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by rly21g.srv.mailcontrol.com (MailControl) id q64914V1031420 for ; Wed, 4 Jul 2012 10:01:04 +0100 Received: from banasiexc02.ASIA.ROOT.PRI ([202.80.51.114]) by rly21g-eth0.srv.mailcontrol.com (envelope-sender ) (MIMEDefang) with ESMTP id q6490x9K029741 (TLS bits=128 verify=FAIL); Wed, 04 Jul 2012 10:01:04 +0100 (BST) Received: from SHAASIEXC01.ASIA.ROOT.PRI (10.125.12.84) by banasiexc02.ASIA.ROOT.PRI (10.190.12.22) with Microsoft SMTP Server (TLS) id 14.1.289.1; Wed, 4 Jul 2012 14:30:59 +0530 Received: from localhost.localdomain (10.125.36.195) by asimail.csr.com (10.125.12.88) with Microsoft SMTP Server (TLS) id 14.1.289.1; Wed, 4 Jul 2012 18:00:57 +0900 From: Barry Song To: Subject: [PATCH] SPI: SIRF: replace -EINVAL by PTR_ERR(clk) when clk_get fails Date: Wed, 4 Jul 2012 17:00:41 +0800 Message-ID: <1341392441-619-1-git-send-email-Barry.Song@csr.com> X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 X-Originating-IP: [10.125.36.195] X-Scanned-By: MailControl 7.7.2 (www.mailcontrol.com) on 10.71.1.131 X-Spam-Score: -0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 AWL AWL: From: address is in the auto white-list X-Headers-End: 1SmLrz-0001az-CI Cc: spi-devel-general@lists.sourceforge.net, workgroup.linux@csr.com, linux-arm-kernel@lists.infradead.org, Barry Song X-BeenThere: spi-devel-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux SPI core/device drivers discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces@lists.sourceforge.net From: Barry Song With this patch, the ret value will be more meaningful. Signed-off-by: Barry Song --- drivers/spi/spi-sirf.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/spi/spi-sirf.c b/drivers/spi/spi-sirf.c index ecc3d97..0b10e4f 100644 --- a/drivers/spi/spi-sirf.c +++ b/drivers/spi/spi-sirf.c @@ -567,7 +567,7 @@ static int __devinit spi_sirfsoc_probe(struct platform_device *pdev) sspi->clk = clk_get(&pdev->dev, NULL); if (IS_ERR(sspi->clk)) { - ret = -EINVAL; + ret = PTR_ERR(sspi->clk); goto free_pin; } clk_enable(sspi->clk);