mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Fabien DESSENNE <fabien.dessenne@st.com>
To: Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	Hugues FRUCHET <hugues.fruchet@st.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
	Alexandre TORGUE <alexandre.torgue@st.com>,
	Pavel Machek <pavel@denx.de>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	"linux-stm32@st-md-mailman.stormreply.com" 
	<linux-stm32@st-md-mailman.stormreply.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH] media: stm32-dcmi: fix irq = 0 case
Date: Mon, 3 Jun 2019 13:03:40 +0000	[thread overview]
Message-ID: <dd4ca76b-9f93-5ddc-e878-25b9905e0cd2@st.com> (raw)
In-Reply-To: <46944972-1f88-ef3b-fef9-8e37753c0ffe@xs4all.nl>

Hi Hans


"platform_get_irq() = 0" shall be considered as an error. See these 
discussions:
https://patchwork.kernel.org/patch/10006651/
https://yarchive.net/comp/linux/zero.html

BR

Fabien

On 03/06/2019 1:45 PM, Hans Verkuil wrote:
> On 5/31/19 11:18 AM, Fabien Dessenne wrote:
>> Manage the irq = 0 case, where we shall return an error.
>>
>> Fixes: b5b5a27bee58 ("media: stm32-dcmi: return appropriate error codes during probe")
>> Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
>> ---
>>   drivers/media/platform/stm32/stm32-dcmi.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers/media/platform/stm32/stm32-dcmi.c
>> index b9dad0a..d855e9c 100644
>> --- a/drivers/media/platform/stm32/stm32-dcmi.c
>> +++ b/drivers/media/platform/stm32/stm32-dcmi.c
>> @@ -1702,7 +1702,7 @@ static int dcmi_probe(struct platform_device *pdev)
>>   	if (irq <= 0) {
> Shouldn't this be 'irq < 0' instead of '<=' ?
>
> AFAICT irq == 0 can be a valid irq and isn't an error.
>
> Regards,
>
> 	Hans
>
>>   		if (irq != -EPROBE_DEFER)
>>   			dev_err(&pdev->dev, "Could not get irq\n");
>> -		return irq;
>> +		return irq ? irq : -ENXIO;
>>   	}
>>   
>>   	dcmi->res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>>

  reply	other threads:[~2019-06-03 13:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-31  9:18 Fabien Dessenne
2019-05-31  9:30 ` Pavel Machek
2019-06-03 11:45 ` Hans Verkuil
2019-06-03 13:03   ` Fabien DESSENNE [this message]
2019-06-03 13:08     ` Hans Verkuil

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=dd4ca76b-9f93-5ddc-e878-25b9905e0cd2@st.com \
    --to=fabien.dessenne@st.com \
    --cc=alexandre.torgue@st.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hugues.fruchet@st.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mchehab@kernel.org \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=pavel@denx.de \
    --cc=sashal@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

all inboxes | Powered by JetHome®