From: Fabio Estevam <festevam@gmail.com>
To: bhelgaas@google.com
Cc: thomas.petazzoni@free-electrons.com, linux-pci@vger.kernel.org,
Fabio Estevam <fabio.estevam@nxp.com>
Subject: [PATCH v2] PCI: armada8k: Check the return value from clk_prepare_enable()
Date: Sat, 22 Jul 2017 17:25:19 -0300 [thread overview]
Message-ID: <1500755119-19983-1-git-send-email-festevam@gmail.com> (raw)
From: Fabio Estevam <fabio.estevam@nxp.com>
clk_prepare_enable() may fail, so we should better check its return value
and propagate it in the case of error.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
Changes since v1:
- Improve Subject style
drivers/pci/dwc/pcie-armada8k.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/dwc/pcie-armada8k.c b/drivers/pci/dwc/pcie-armada8k.c
index ea8f34a..7297223 100644
--- a/drivers/pci/dwc/pcie-armada8k.c
+++ b/drivers/pci/dwc/pcie-armada8k.c
@@ -226,7 +226,9 @@ static int armada8k_pcie_probe(struct platform_device *pdev)
if (IS_ERR(pcie->clk))
return PTR_ERR(pcie->clk);
- clk_prepare_enable(pcie->clk);
+ ret = clk_prepare_enable(pcie->clk);
+ if (ret)
+ return ret;
/* Get the dw-pcie unit configuration/control registers base. */
base = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ctrl");
--
2.7.4
next reply other threads:[~2017-07-22 20:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-22 20:25 Fabio Estevam [this message]
2017-07-22 20:31 ` [PATCH v2] PCI: armada8k: Check the return value from clk_prepare_enable() Thomas Petazzoni
2017-08-03 22:02 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1500755119-19983-1-git-send-email-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=bhelgaas@google.com \
--cc=fabio.estevam@nxp.com \
--cc=linux-pci@vger.kernel.org \
--cc=thomas.petazzoni@free-electrons.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.