summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2018-12-01 01:45:46 +0000
committerUlf Hansson <ulf.hansson@linaro.org>2018-12-17 08:26:24 +0100
commitfeb357458baa0bd0f644a5bd790841555b959b48 (patch)
treecc83f5ece5551984f7e5ee3d792e50e090193714 /drivers/mmc
parent67b4ff9fb796d8e572a9bb82d851639a81812aa9 (diff)
mmc: jz4740: Use PTR_ERR_OR_ZERO in jz4740_mmc_request_gpios()
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: YueHaibing <yuehaibing@huawei.com> Acked-by: Joey Pabalinas <joeypabalinas@gmail.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/jz4740_mmc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c
index e82b0e14822a..33215d66afa2 100644
--- a/drivers/mmc/host/jz4740_mmc.c
+++ b/drivers/mmc/host/jz4740_mmc.c
@@ -965,10 +965,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[] = {