public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: Andi Shyti <andi.shyti@samsung.com>,
	Javier Martinez Canillas <javier@osg.samsung.com>
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Kukjin Kim <kgene@kernel.org>,
	linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	Lukasz Majewski <l.majewski@samsung.com>,
	Zhang Rui <rui.zhang@intel.com>,
	Eduardo Valentin <edubezval@gmail.com>
Subject: Re: [PATCH 3/3] thermal: exynos: Defer probe if vtmu is present but not registered
Date: Fri, 19 Feb 2016 13:25:05 +0900	[thread overview]
Message-ID: <56C69921.4050201@samsung.com> (raw)
In-Reply-To: <20160219042014.GB27936@samsunx.samsung>

On 19.02.2016 13:20, Andi Shyti wrote:
> Hi Javier,
> 
> Just a question...
> 
>> diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
>> index f4f36bba7be9..f3ce94ec73b5 100644
>> --- a/drivers/thermal/samsung/exynos_tmu.c
>> +++ b/drivers/thermal/samsung/exynos_tmu.c
>> @@ -1318,6 +1318,8 @@ static int exynos_tmu_probe(struct platform_device *pdev)
>>  			return ret;
>>  		}
>>  	} else {
>> +		if (PTR_ERR(data->regulator) == -EPROBE_DEFER)
>> +			return -EPROBE_DEFER;
> 
> shouldn't we return also in case of -ENOMEM? -ENOMEM is a Kernel
> failure, not depending on the regulator itself.

Usually not because that would make this error path quite complicated
and difficult to keep consistent. If you choose this way then you will
have to probably extend the black list (e.g. EINVAL, some other)... or
use a white list.

Additionally the error codes can come from deeper layers. These layer
now can return ESOMETHING but later it might change to EDIFFERENT... you
cannot predict that.

Whatever the reason was (except defer), just ignore the regulator.

Best regards,
Krzysztof

  reply	other threads:[~2016-02-19  4:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-18 18:19 [PATCH 0/3] thermal: exynos: Fixes for vtmu-supply regulator handling Javier Martinez Canillas
2016-02-18 18:19 ` [PATCH 1/3] thermal: exynos: List vtmu-supply as optional property in DT binding Javier Martinez Canillas
2016-02-19  0:26   ` Krzysztof Kozlowski
2016-02-23 20:26   ` Rob Herring
2016-03-08 21:07   ` Eduardo Valentin
2016-03-08 21:30     ` Javier Martinez Canillas
2016-03-08 21:51       ` Eduardo Valentin
2016-02-18 18:19 ` [PATCH 2/3] thermal: exynos: Use devm_regulator_get_optional() for vtmu Javier Martinez Canillas
2016-02-19  0:33   ` Krzysztof Kozlowski
2016-02-18 18:19 ` [PATCH 3/3] thermal: exynos: Defer probe if vtmu is present but not registered Javier Martinez Canillas
2016-02-19  0:37   ` Krzysztof Kozlowski
2016-02-19  4:20   ` Andi Shyti
2016-02-19  4:25     ` Krzysztof Kozlowski [this message]
2016-02-19  4:29 ` [PATCH 0/3] thermal: exynos: Fixes for vtmu-supply regulator handling Andi Shyti
2016-03-08 13:30 ` Javier Martinez Canillas

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=56C69921.4050201@samsung.com \
    --to=k.kozlowski@samsung.com \
    --cc=andi.shyti@samsung.com \
    --cc=edubezval@gmail.com \
    --cc=javier@osg.samsung.com \
    --cc=kgene@kernel.org \
    --cc=l.majewski@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=rui.zhang@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox