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 3/4] extcon: max77843: Return error code of extcon_dev_allocate()
Date: Sat, 29 Aug 2020 14:43:55 +0200 [thread overview]
Message-ID: <20200829124356.18148-3-krzk@kernel.org> (raw)
In-Reply-To: <20200829124356.18148-1-krzk@kernel.org>
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-max77843.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/extcon/extcon-max77843.c b/drivers/extcon/extcon-max77843.c
index e6b50ca83008..8e6e97ec65a8 100644
--- a/drivers/extcon/extcon-max77843.c
+++ b/drivers/extcon/extcon-max77843.c
@@ -845,7 +845,7 @@ static int max77843_muic_probe(struct platform_device *pdev)
max77843_extcon_cable);
if (IS_ERR(info->edev)) {
dev_err(&pdev->dev, "Failed to allocate memory for extcon\n");
- ret = -ENODEV;
+ ret = PTR_ERR(info->edev);
goto err_muic_irq;
}
--
2.17.1
next prev parent 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 [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 ` Krzysztof Kozlowski [this message]
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-3-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