From patchwork Tue Jan 11 12:43:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jamie Iles X-Patchwork-Id: 471301 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0BCjbhI023890 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 11 Jan 2011 12:46:00 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Pcdat-00055N-MB; Tue, 11 Jan 2011 12:44:59 +0000 Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Pcdat-00055I-1J for spi-devel-general@lists.sourceforge.net; Tue, 11 Jan 2011 12:44:59 +0000 X-ACL-Warn: Received: from mail-wy0-f175.google.com ([74.125.82.175]) by sog-mx-1.v43.ch3.sourceforge.com with esmtp (Exim 4.72) id 1Pcdar-0002TU-8g for spi-devel-general@lists.sourceforge.net; Tue, 11 Jan 2011 12:44:58 +0000 Received: by wyb40 with SMTP id 40so19734332wyb.34 for ; Tue, 11 Jan 2011 04:44:51 -0800 (PST) Received: by 10.216.71.13 with SMTP id q13mr8366111wed.21.1294749890921; Tue, 11 Jan 2011 04:44:50 -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 i80sm14698335wej.4.2011.01.11.04.44.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 11 Jan 2011 04:44:50 -0800 (PST) From: Jamie Iles To: linux-kernel@vger.kernel.org Subject: [PATCH 15/16] spi: dw_spi: don't treat NULL clk as an error Date: Tue, 11 Jan 2011 12:43:52 +0000 Message-Id: <1294749833-32019-16-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> X-Spam-Score: 0.3 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.3 AWL AWL: From: address is in the auto white-list X-Headers-End: 1Pcdar-0002TU-8g Cc: Jamie Iles , spi-devel-general@lists.sourceforge.net 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: , MIME-Version: 1.0 Errors-To: spi-devel-general-bounces@lists.sourceforge.net 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:46:00 +0000 (UTC) diff --git a/drivers/spi/dw_spi_mmio.c b/drivers/spi/dw_spi_mmio.c index db35bd9..2fa012c 100644 --- a/drivers/spi/dw_spi_mmio.c +++ b/drivers/spi/dw_spi_mmio.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include @@ -68,8 +69,8 @@ static int __devinit dw_spi_mmio_probe(struct platform_device *pdev) } dwsmmio->clk = clk_get(&pdev->dev, NULL); - if (!dwsmmio->clk) { - ret = -ENODEV; + if (IS_ERR(dwsmmio->clk)) { + ret = PTR_ERR(dwsmmio->clk); goto err_irq; } clk_enable(dwsmmio->clk);