From: YueHaibing <yuehaibing@huawei.com>
To: kernel-janitors@vger.kernel.org
Subject: [PATCH -next] mmc: jz4740: Use PTR_ERR_OR_ZERO in jz4740_mmc_request_gpios()
Date: Sat, 01 Dec 2018 01:45:46 +0000 [thread overview]
Message-ID: <1543628746-101825-1-git-send-email-yuehaibing@huawei.com> (raw)
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/mmc/host/jz4740_mmc.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c
index 6f7a99e..8eca423 100644
--- a/drivers/mmc/host/jz4740_mmc.c
+++ b/drivers/mmc/host/jz4740_mmc.c
@@ -975,10 +975,7 @@ static int jz4740_mmc_request_gpios(struct jz4740_mmc_host *host,
host->power = devm_gpiod_get_optional(&pdev->dev, "power",
GPIOD_OUT_HIGH);
- if (IS_ERR(host->power))
- return PTR_ERR(host->power);
-
- return 0;
+ return PTR_ERR_OR_ZERO(host->power);
}
static const struct of_device_id jz4740_mmc_of_match[] = {
next reply other threads:[~2018-12-01 1:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-01 1:45 YueHaibing [this message]
2018-12-01 1:55 ` [PATCH -next] mmc: jz4740: Use PTR_ERR_OR_ZERO in jz4740_mmc_request_gpios() Joey Pabalinas
2018-12-01 12:58 ` Linus Walleij
2018-12-05 14:24 ` Ulf Hansson
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=1543628746-101825-1-git-send-email-yuehaibing@huawei.com \
--to=yuehaibing@huawei.com \
--cc=kernel-janitors@vger.kernel.org \
/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