From: Chanwoo Choi <cw00.choi@samsung.com>
To: Chanwoo Choi <cw00.choi@samsung.com>
Cc: dbaryshkov@gmail.com, dwmw2@infradead.org,
myungjoo.ham@samsung.com, kyungmin.park@samsung.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] charger-manager: Fix checking of wrong return type
Date: Wed, 19 Mar 2014 13:43:55 +0900 [thread overview]
Message-ID: <5329208B.3090401@samsung.com> (raw)
In-Reply-To: <1395056031-13666-1-git-send-email-cw00.choi@samsung.com>
Ping.
Thanks,
Chanwoo Choi
On 03/17/2014 08:33 PM, Chanwoo Choi wrote:
> This patch fix minor issue about checking wrong return type.
>
> The of_cm_parse_desc() return ERR_PTR(errnor number) when some error happen
> in this function. But, charger_manager_probe() has only checked whether
> desc is NULL or not. If of_cm_parse_desc() returns ERR_PTR(-ENOMEM), desc
> isn't NULL but desc is (void *)(-ENOMEM). Althouhg some error happen for parsing
> DT, charger_manager_probe() can't detect error of desc instance.
>
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
> ---
> drivers/power/charger-manager.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/power/charger-manager.c b/drivers/power/charger-manager.c
> index 9e4dab4..a10fb57 100644
> --- a/drivers/power/charger-manager.c
> +++ b/drivers/power/charger-manager.c
> @@ -1677,7 +1677,7 @@ static int charger_manager_probe(struct platform_device *pdev)
> }
> }
>
> - if (!desc) {
> + if (IS_ERR(desc)) {
> dev_err(&pdev->dev, "No platform data (desc) found\n");
> return -ENODEV;
> }
>
next prev parent reply other threads:[~2014-03-19 4:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-17 11:33 [PATCH] charger-manager: Fix checking of wrong return type Chanwoo Choi
2014-03-19 4:43 ` Chanwoo Choi [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-03-17 11:31 y
2014-03-17 11:33 ` Chanwoo Choi
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=5329208B.3090401@samsung.com \
--to=cw00.choi@samsung.com \
--cc=dbaryshkov@gmail.com \
--cc=dwmw2@infradead.org \
--cc=kyungmin.park@samsung.com \
--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