From: Krzysztof Kozlowski <krzk@kernel.org>
To: Chanwoo Choi <cw00.choi@samsung.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
MyungJoo Ham <myungjoo.ham@samsung.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 1/4] extcon: max14577: Return error code of extcon_dev_allocate()
Date: Sat, 29 Aug 2020 14:43:53 +0200 [thread overview]
Message-ID: <20200829124356.18148-1-krzk@kernel.org> (raw)
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
next reply other threads:[~2020-08-29 12:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-29 12:43 Krzysztof Kozlowski [this message]
2020-08-29 12:43 ` [PATCH 2/4] extcon: max77693: Return error code of extcon_dev_allocate() 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 ` [PATCH 1/4] extcon: max14577: " 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=20200829124356.18148-1-krzk@kernel.org \
--to=krzk@kernel.org \
--cc=b.zolnierkie@samsung.com \
--cc=cw00.choi@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