From patchwork Tue Jan 11 12:43:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jamie Iles X-Patchwork-Id: 471321 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 p0BCkFOs024233 for ; Tue, 11 Jan 2011 12:46:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756042Ab1AKMou (ORCPT ); Tue, 11 Jan 2011 07:44:50 -0500 Received: from mail-ww0-f44.google.com ([74.125.82.44]:51682 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756063Ab1AKMos (ORCPT ); Tue, 11 Jan 2011 07:44:48 -0500 Received: by mail-ww0-f44.google.com with SMTP id 36so1715203wwa.1 for ; Tue, 11 Jan 2011 04:44:48 -0800 (PST) Received: by 10.227.98.158 with SMTP id q30mr1991732wbn.151.1294749887872; Tue, 11 Jan 2011 04:44:47 -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 f35sm20916327wbf.20.2011.01.11.04.44.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 11 Jan 2011 04:44:47 -0800 (PST) From: Jamie Iles To: linux-kernel@vger.kernel.org Cc: Jamie Iles , linux-mmc@vger.kernel.org Subject: [PATCH 13/16] MMC: jz4740: don't treat NULL clk as an error Date: Tue, 11 Jan 2011 12:43:50 +0000 Message-Id: <1294749833-32019-14-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-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@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:46:15 +0000 (UTC) diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c index b3a0ab0..74218ad 100644 --- a/drivers/mmc/host/jz4740_mmc.c +++ b/drivers/mmc/host/jz4740_mmc.c @@ -14,6 +14,7 @@ */ #include +#include #include #include #include @@ -827,8 +828,8 @@ static int __devinit jz4740_mmc_probe(struct platform_device* pdev) } host->clk = clk_get(&pdev->dev, "mmc"); - if (!host->clk) { - ret = -ENOENT; + if (IS_ERR(host->clk)) { + ret = PTR_ERR(host->clk); dev_err(&pdev->dev, "Failed to get mmc clock\n"); goto err_free_host; }