From: Chanwoo Choi <cw00.choi@samsung.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch 2/2] extcon: max77843: fix an error code in max77843_init_muic_regmap()
Date: Mon, 23 Mar 2015 01:49:56 +0000 [thread overview]
Message-ID: <550F7144.9050608@samsung.com> (raw)
In-Reply-To: <20150315105604.GE20691@mwanda>
Hi Dan,
On 03/15/2015 07:56 PM, Dan Carpenter wrote:
> "max77843->i2c_muic" is NULL, not an error code. Let's return -ENODEV
> here.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/extcon/extcon-max77843.c b/drivers/extcon/extcon-max77843.c
> index a3f80ca..6f0ed5a 100644
> --- a/drivers/extcon/extcon-max77843.c
> +++ b/drivers/extcon/extcon-max77843.c
> @@ -715,7 +715,7 @@ static int max77843_init_muic_regmap(struct max77843 *max77843)
> if (!max77843->i2c_muic) {
> dev_err(&max77843->i2c->dev,
> "Cannot allocate I2C device for MUIC\n");
> - return PTR_ERR(max77843->i2c_muic);
> + return -ENODEV;
I think that -ENOMEM is more proper error than -ENODEV.
So, I'll use -ENOMEM value and applied it on extcon-next branch.
Thanks,
Chanwoo Choi
> }
>
> i2c_set_clientdata(max77843->i2c_muic, max77843);
>
prev parent reply other threads:[~2015-03-23 1:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-15 10:56 [patch 2/2] extcon: max77843: fix an error code in max77843_init_muic_regmap() Dan Carpenter
2015-03-23 1:49 ` Chanwoo Choi [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=550F7144.9050608@samsung.com \
--to=cw00.choi@samsung.com \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=myungjoo.ham@samsung.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;
as well as URLs for NNTP newsgroup(s).