From: Chanwoo Choi <chanwoo@kernel.org>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Chanwoo Choi <cw00.choi@samsung.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
MyungJoo Ham <myungjoo.ham@samsung.com>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/4] extcon: max14577: Return error code of extcon_dev_allocate()
Date: Sat, 29 Aug 2020 22:10:26 +0900 [thread overview]
Message-ID: <CAGTfZH0o1-_mgpiLxnmhtV3-yrybr9uDDQAV_eE3oFEdd4nz8g@mail.gmail.com> (raw)
In-Reply-To: <20200829124356.18148-1-krzk@kernel.org>
On Sat, Aug 29, 2020 at 9:46 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> devm_extcon_dev_allocate() can fail of multiple reasons. The call
> returns proper error code on failure so pass it instead of fixed ENOMEM.
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
> drivers/extcon/extcon-max14577.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/extcon/extcon-max14577.c b/drivers/extcon/extcon-max14577.c
> index cc47d626095c..ace523924e58 100644
> --- a/drivers/extcon/extcon-max14577.c
> +++ b/drivers/extcon/extcon-max14577.c
> @@ -713,7 +713,7 @@ static int max14577_muic_probe(struct platform_device *pdev)
> max14577_extcon_cable);
> if (IS_ERR(info->edev)) {
> dev_err(&pdev->dev, "failed to allocate memory for extcon\n");
> - return -ENOMEM;
> + return PTR_ERR(info->edev);
> }
>
> ret = devm_extcon_dev_register(&pdev->dev, info->edev);
> --
> 2.17.1
>
Applied them for patch1-4. Thanks.
--
Best Regards,
Chanwoo Choi
Samsung Electronics
prev parent reply other threads:[~2020-08-29 13:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-29 12:43 [PATCH 1/4] extcon: max14577: Return error code of extcon_dev_allocate() Krzysztof Kozlowski
2020-08-29 12:43 ` [PATCH 2/4] extcon: max77693: " Krzysztof Kozlowski
2020-08-29 12:43 ` [PATCH 3/4] extcon: max77843: " Krzysztof Kozlowski
2020-08-29 12:43 ` [PATCH 4/4] extcon: max8997: " Krzysztof Kozlowski
2020-08-29 13:10 ` 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=CAGTfZH0o1-_mgpiLxnmhtV3-yrybr9uDDQAV_eE3oFEdd4nz8g@mail.gmail.com \
--to=chanwoo@kernel.org \
--cc=b.zolnierkie@samsung.com \
--cc=cw00.choi@samsung.com \
--cc=krzk@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).