From: Eli Billauer <eli.billauer@gmail.com>
To: Jingoo Han <jg1.han@samsung.com>
Cc: "'Wei Yongjun'" <weiyj.lk@gmail.com>,
gregkh@linuxfoundation.org, yongjun_wei@trendmicro.com.cn,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] staging: xillybus: fix error return code in xilly_probe()
Date: Mon, 16 Dec 2013 14:47:44 +0200 [thread overview]
Message-ID: <52AEF670.6060108@gmail.com> (raw)
In-Reply-To: <000601cefa46$780f81e0$682e85a0$%han@samsung.com>
Thanks for reporting this bug. The same bug exists in the driver for OF
(xillybus_of.c).
As for the choice of -EIO, I've surveyed several drivers calling
of_iomap() and pci_iomap(), and it turns out that some fail on -ENOMEM,
some on -EIO and some on -EBUSY.
Personally, I'm inclined towards -ENOMEM, since the problem is a memory
mapping failure.
I'll submit a patch fixing both files soon.
Thanks again,
Eli
On 16/12/13 12:06, Jingoo Han wrote:
> On Monday, December 16, 2013 2:51 PM, Wei Yongjun wrote:
>
>> From: Wei Yongjun<yongjun_wei@trendmicro.com.cn>
>>
>> Fix to return negative error code -EIO from the error handling
>> case instead of 0.
>>
>> Signed-off-by: Wei Yongjun<yongjun_wei@trendmicro.com.cn>
>> ---
>> drivers/staging/xillybus/xillybus_pcie.c | 2 +-
>>
> It looks good.
> Reviewed-by: Jingoo Han<jg1.han@samsung.com>
>
> Best regards,
> Jingoo Han
>
>
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/staging/xillybus/xillybus_pcie.c b/drivers/staging/xillybus/xillybus_pcie.c
>> index 0564f97..51426d8 100644
>> --- a/drivers/staging/xillybus/xillybus_pcie.c
>> +++ b/drivers/staging/xillybus/xillybus_pcie.c
>> @@ -168,9 +168,9 @@ static int xilly_probe(struct pci_dev *pdev,
>> }
>>
>> endpoint->registers = pci_iomap(pdev, 0, 128);
>> -
>> if (!endpoint->registers) {
>> dev_err(endpoint->dev, "Failed to map BAR 0. Aborting.\n");
>> + rc = -EIO;
>> goto failed_iomap0;
>> }
>>
>>
>
prev parent reply other threads:[~2013-12-16 13:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-16 5:51 [PATCH -next] staging: xillybus: fix error return code in xilly_probe() Wei Yongjun
2013-12-16 10:06 ` Jingoo Han
2013-12-16 12:47 ` Eli Billauer [this message]
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=52AEF670.6060108@gmail.com \
--to=eli.billauer@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=jg1.han@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=weiyj.lk@gmail.com \
--cc=yongjun_wei@trendmicro.com.cn \
/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.