From: Ben Dooks <ben-linux@fluff.org>
To: Sundar <sunder.svit@gmail.com>
Cc: Kenneth Heitke <kheitke@codeaurora.org>,
tsoni@codeaurora.org, Daniel Walker <dwalker@codeaurora.org>,
sdharia@codeaurora.com, linus.walleij@stericsson.com,
Crane Cai <crane.cai@amd.com>,
srinidhi.kasagar@stericsson.com, linux-arm-msm@vger.kernel.org,
Bryan Huntsman <bryanh@codeaurora.org>,
Ralf Baechle <ralf@linux-mips.org>,
linux-kernel@vger.kernel.org, arve@android.com,
linux-i2c@vger.kernel.org, ben-linux@fluff.org,
swetland@google.com, khali@linux-fr.org,
Russell King <linux@arm.linux.org.uk>,
David Brown <davidb@codeaurora.org>,
linux-arm-kernel@lists.infradead.org,
Samuel Ortiz <sameo@linux.intel.com>
Subject: Re: [PATCH v3] i2c: QUP based bus driver for Qualcomm MSM chipsets
Date: Mon, 27 Sep 2010 00:04:01 +0100 [thread overview]
Message-ID: <4C9FD161.2000606@fluff.org> (raw)
In-Reply-To: <AANLkTimHQ=ag5z+SKbGrm5BD-eF+xcDuKp4R_=4tf3cP@mail.gmail.com>
On 09/09/10 20:01, Sundar wrote:
> Hi Kenneth,
>
> just some error codes and leaks if I am right :)
>
> On Wed, Sep 8, 2010 at 6:29 AM, Kenneth Heitke <kheitke@codeaurora.org> wrote:
>> +
>> +static int __devinit
>> +qup_i2c_probe(struct platform_device *pdev)
>> +{
>> +
>> + qup_mem = platform_get_resource_byname(pdev, IORESOURCE_MEM,
>> + "qup_phys_addr");
>> + if (!qup_mem) {
>> + dev_err(&pdev->dev, "no qup mem resource?\n");
>> + return -ENODEV;
>
> I think this should be -ENXIO instead of -ENODEV?
I think both are inappropriate here, -ENXIO is an IO failure
and -ENODEV is 'device is not here'. However, some people don't
like the use of things like -ENOENT (filesystem errors) for this
sort of situation. ENOTSUP might be something you could use.
As a note, both ENXIO and ENODEV will be taken by the device
framework as a device is not there at-all and not display any
error to the user (which is annoying if you then forget to
do anything about it)
As a note, you may want to have a look at devres to offload the
tracking of the requested and mapped resources.
prev parent reply other threads:[~2010-09-26 23:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-08 0:59 [PATCH v3] i2c: QUP based bus driver for Qualcomm MSM chipsets Kenneth Heitke
2010-09-08 13:23 ` Trilok Soni
2010-09-09 19:01 ` Sundar
2010-09-09 20:52 ` Kenneth Heitke
2010-09-26 23:04 ` Ben Dooks [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=4C9FD161.2000606@fluff.org \
--to=ben-linux@fluff.org \
--cc=arve@android.com \
--cc=bryanh@codeaurora.org \
--cc=crane.cai@amd.com \
--cc=davidb@codeaurora.org \
--cc=dwalker@codeaurora.org \
--cc=khali@linux-fr.org \
--cc=kheitke@codeaurora.org \
--cc=linus.walleij@stericsson.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=ralf@linux-mips.org \
--cc=sameo@linux.intel.com \
--cc=sdharia@codeaurora.com \
--cc=srinidhi.kasagar@stericsson.com \
--cc=sunder.svit@gmail.com \
--cc=swetland@google.com \
--cc=tsoni@codeaurora.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;
as well as URLs for NNTP newsgroup(s).