From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH] ARM: shmobile: clk_get() returns error code on failure
Date: Thu, 09 Jan 2014 17:42:38 +0000 [thread overview]
Message-ID: <1608206.pzDrTMclkD@avalon> (raw)
In-Reply-To: <1389281623-10253-1-git-send-email-ben.dooks@codethink.co.uk>
Hi Ben,
Thank you for the patch.
On Thursday 09 January 2014 15:33:43 Ben Dooks wrote:
> The lager_add_standard_devices() function calls clk_get() but then fails
> to check that it returns an error pointer instead of NULL on failure.
>
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> Reviewed-by: Ian Molton <ian.molton@codethink.co.uk>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Do you plan to submit a similar patch for board-koelsch-reference.c ? I don't
mind doing it.
> ---
> arch/arm/mach-shmobile/board-lager-reference.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-shmobile/board-lager-reference.c
> b/arch/arm/mach-shmobile/board-lager-reference.c index a6e271d..dc8d76b
> 100644
> --- a/arch/arm/mach-shmobile/board-lager-reference.c
> +++ b/arch/arm/mach-shmobile/board-lager-reference.c
> @@ -44,14 +44,14 @@ static void __init lager_add_standard_devices(void)
>
> for (i = 0; i < ARRAY_SIZE(scif_names); ++i) {
> clk = clk_get(NULL, scif_names[i]);
> - if (clk) {
> + if (!IS_ERR(clk)) {
> clk_register_clkdev(clk, NULL, "sh-sci.%u", i);
> clk_put(clk);
> }
> }
>
> clk = clk_get(NULL, "cmt0");
> - if (clk) {
> + if (!IS_ERR(clk)) {
> clk_register_clkdev(clk, NULL, "sh_cmt.0");
> clk_put(clk);
> }
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2014-01-09 17:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-09 15:33 [PATCH] ARM: shmobile: clk_get() returns error code on failure Ben Dooks
2014-01-09 17:42 ` Laurent Pinchart [this message]
2014-01-10 1:23 ` Simon Horman
2014-01-10 11:36 ` Ben Dooks
2014-01-13 0:12 ` Simon Horman
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=1608206.pzDrTMclkD@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=linux-sh@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox