mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/2] clk: fix clk_get error handling
Date: Tue, 4 Jul 2017 08:53:38 +0200	[thread overview]
Message-ID: <20170704065338.GA12492@ravnborg.org> (raw)
In-Reply-To: <20170704061133.jow6aixpw5mp5m4c@pengutronix.de>

Hi Uwe.

Thanks for the quick feedback!

> Looking into the tree of functions that can be called from
> of_clk_get_by_name I didn't find a function that returns ENODEV.
> 
> But consider a clock provider that tries to give you the clock and
> triggers a EIO or ETIMEOUT. IMHO this should be given to the caller
> instead of continuing with clk_get_sys. So I suggest
> 
> -		if (!IS_ERR(clk) || PTR_ERR(clk) != -ENODEV)
> +		if (!IS_ERR(clk) || PTR_ERR(clk) != -ENOENT)
> 
> instead of your patch.

Makes good sense and it was only because the kernel did otherwise
I explicitly tested for -EPROBE_DEFER.
Will rework and send an updated patch later today.

	Sam

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2017-07-04  6:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-03 16:19 Observations with AT91SAM9263-EK Sam Ravnborg
2017-07-03 16:34 ` Jean-Christophe PLAGNIOL-VILLARD
2017-07-03 21:07   ` Sam Ravnborg
2017-07-03 20:17 ` [PATCH 1/2] clk: fix clk_get error handling Sam Ravnborg
2017-07-04  6:11   ` Uwe Kleine-König
2017-07-04  6:53     ` Sam Ravnborg [this message]
2017-07-03 20:22 ` [PATCH 2/2] gpio: fix null pointer exception when there is no oftree Sam Ravnborg

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=20170704065338.GA12492@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=barebox@lists.infradead.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /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